Parse log config from args config instead of a file in configparser format
This lets you configure logging directly from configuration instead of needing a seperate file.
i.e. Something like
# log_config.ini
[loggers]
keys=root
[handlers]
keys=consoleHandler
[formatters]
keys=ecsStdLibFormatter
[logger_root]
level=DEBUG
handlers=consoleHandler
[handler_consoleHandler]
class=StreamHandler
formatter=ecsStdLibFormatter
args=(sys.stdout,)
[formatter_ecsStdLibFormatter]
class=ecs_logging.StdlibFormatter
Becomes:
# config.yaml
stream_manager:
# ...
log_config:
root:
level: DEBUG
handler: consoleHandler
handlers:
consoleHandler:
class: logging.StreamHandler
formatter: ecsStdLibFormatter
stream : ext://sys.stdout
formatters:
ecsStdLibFormatter:
class: ecs_logging.StdlibFormatter