We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
is there a way to make it work with https://github.com/hynek/structlog from @hynek?
i am currently can't make it work with simple level configuration.
e1:
import structlog import click_log log = structlog.getLogger() @click.command() @click_log.simple_verbosity_option() @click_log.init() def main(): structlog.configure(logger_factory=structlog.stdlib.LoggerFactory()) log.debug('test', v=1)
this work, but it also log the selenium module which my program use.
is there a way to limit the logger to my program only?
e2: still log other module
import logging import structlog import click_log log = structlog.getLogger() @click.command() @click_log.simple_verbosity_option() @click_log.init() def main(): logging.basicConfig(level=click_log.get_level()) structlog.configure(logger_factory=structlog.stdlib.LoggerFactory()) log.debug('test', v=1)
e3: the working version without click_log
import logging import structlog @click.command() @click.option('-d', '--debug', is_flag=True, help="Enable debug.") def main(debug): if debug: logging.basicConfig(level=logging.DEBUG) else: logging.basicConfig(level=logging.INFO) structlog.configure_once(logger_factory=structlog.stdlib.LoggerFactory()) log = structlog.getLogger() log.debug('test', v=1)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
is there a way to make it work with https://github.com/hynek/structlog from @hynek?
i am currently can't make it work with simple level configuration.e1:
this work, but it also log the selenium module which my program use.
is there a way to limit the logger to my program only?
e2: still log other module
e3: the working version without click_log
The text was updated successfully, but these errors were encountered: