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

Feature Request: Add logging level support as a default parameter for functions #140

Open
cheney-yan opened this issue Sep 13, 2018 · 1 comment

Comments

@cheney-yan
Copy link

It would be nice to add a logging level option as a default option for all methods.

An ideal implementation would be like a decorator for a function: when a function is decorated, then the function will be added with [--log-level INFO] without specifying so.

For example, a method with a decorator:

@fire.logger(logger_object):
def a_method(params1):
     logger_object.debug('log line')

Will actually make a_method(param1) works like a_method(param1, log_level=logging.INFO).

@j6k4m8
Copy link

j6k4m8 commented Apr 7, 2022

Love this idea — it doesn't seem like there's an easy way to do this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants