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

feat: Set default logging level to align with Flask's defaults #336

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/functions_framework/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def _configure_app_execution_id_logging():
"stream": "ext://functions_framework.execution_id.logging_stream",
},
},
"root": {"level": "INFO", "handlers": ["wsgi"]},
"root": {"level": "WARNING", "handlers": ["wsgi"]},
}
)

Expand Down
6 changes: 3 additions & 3 deletions tests/test_functions/execution_id/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def print_message(request):

def log_message(request):
json = request.get_json(silent=True)
logger.info(json.get("message"))
logger.warning(json.get("message"))
return "success", 200


Expand All @@ -27,7 +27,7 @@ def error(request):
def sleep(request):
json = request.get_json(silent=True)
message = json.get("message")
logger.info(message)
logger.warning(message)
time.sleep(1)
logger.info(message)
logger.warning(message)
return "success", 200
Loading