Skip to content

Commit

Permalink
feat: Set default logging level to align with Flask's defaults (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
nifflets authored Jun 11, 2024
1 parent 94763d8 commit d1d0753
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit d1d0753

Please sign in to comment.