[default]
disable_existing_loggers = 0

[loggers]
keys = root, gunicorn.access, sqlalchemy, kafka, kafka.consumer, urllib3

[handlers]
keys = console, console_access

[formatters]
keys = context, generic

[logger_root]
level = {{ LOG_LEVEL_ROOT }}
handlers = console

[logger_gunicorn.access]
level = INFO
handlers = console_access
propagate = 0
qualname = gunicorn.access

[logger_sqlalchemy]
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither.  (Recommended for production systems.)
level = ERROR
handlers = console
propagate=0

[logger_kafka.consumer]
qualname = kafka.consumer
level = INFO
formatter = default
handlers = console
propagate = 0

[logger_kafka]
qualname = monasca_common.kafka_lib
level = INFO
formatter = default
handlers = console
propagate = 0

[logger_urllib3]
qualname = urllib3.connectionpool
level = INFO
formatter = default
handlers = console
propagate = 0

[handler_console]
class = logging.StreamHandler
args = (sys.stdout,)
level = {{ LOG_LEVEL_CONSOLE }}
formatter = context

[handler_console_access]
class = logging.StreamHandler
args = (sys.stdout,)
level = {{ LOG_LEVEL_ACCESS }}
formatter = generic

[formatter_context]
class = oslo_log.formatters.ContextFormatter

[formatter_generic]
format={{ ACCESS_LOG_FORMAT }}
datefmt=%Y-%m-%d %H:%M:%S
class=logging.Formatter
