How to set log level for structlog
You can set the structlog
log level by using the logging
module:
import logging
# Example 1: Output only DEBUG and higher levels
structlog.configure(
wrapper_class=structlog.make_filtering_bound_logger(logging.DEBUG),
)
# Example 2: Output only INFO and higher levels
structlog.configure(
wrapper_class=structlog.make_filtering_bound_logger(logging.INFO),
)