Add a root logger to the fedmsg base logging config

This alters the logging configuration for all fedmsg applications. It
adds a root logger configuration which handles messages that are not
covered by other loggers (and which also have ``propagate=False``). This
means that all Python modules will now be able to emit log messages,
rather than those in the ``fedmsg`` or ``moksha`` Python packages (or
other packages that use their loggers).

Signed-off-by: Jeremy Cline <jeremy@jcline.org>
This commit is contained in:
Jeremy Cline 2017-02-08 18:22:14 +00:00
parent d3cd58ec25
commit b332de14b3

View file

@ -237,5 +237,11 @@ config = dict(
"handlers": ["console", "mailer"],
},
),
# Root handler that deals with log messages that are not handled by the
# loggers explicitly configured in the `loggers` dict.
root={
"level": "{{fedmsg_loglevel}}",
"handlers": ["console", "mailer"],
},
),
)