Using Flask's application context and logging infrastructure, implement a RequestAwareLogger class in task…
Using Flask's application context and logging infrastructure, implement a RequestAwareLogger class in task…: a task in repo2rlenv-code-instruct (Harbor dataset). The class must: 1. Accept a flask.Flask application instance in its constructor. 2. Expose a log message(level: str, message: str) - str…
The task
The class must: 1. Accept a `flask.Flask` application instance in its constructor. 2. Expose a `log_message(level: str, message: str) -> str` method that, when called **inside an active Flask request context**, prepends `[REQUEST:<path>]` to the message before logging it; when called **outside** a request context,…
Part of FineEnvs/repo2rlenv-code-instruct.