Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce log levels #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions aws_embedded_metrics/environment/environment_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ async def resolve_environment() -> Environment:
elif lower_configured_enviroment == "local":
EnvironmentCache.environment = local_environment
else:
log.info("Failed to understand environment override: %s", Config.environment)
log.error("Failed to understand environment override: %s", Config.environment)
if EnvironmentCache.environment is not None:
return EnvironmentCache.environment

for env_under_test in environments:
is_environment = False
try:
log.info("Testing environment: %s", env_under_test.__class__.__name__)
log.debug("Testing environment: %s", env_under_test.__class__.__name__)
is_environment = await env_under_test.probe()
except Exception as e:
log.error(
Expand All @@ -66,10 +66,10 @@ async def resolve_environment() -> Environment:
pass

if is_environment:
log.info("Detected environment: %s", env_under_test.__class__.__name__)
log.debug("Detected environment: %s", env_under_test.__class__.__name__)
EnvironmentCache.environment = env_under_test
return env_under_test

log.info("No environment was detected. Using default.")
log.debug("No environment was detected. Using default.")
EnvironmentCache.environment = default_environment
return EnvironmentCache.environment