summaryrefslogtreecommitdiffstats
path: root/roles/fedmsg
diff options
context:
space:
mode:
authorJeremy Cline <jeremy@jcline.org>2017-02-08 18:22:14 +0000
committerJeremy Cline <jeremy@jcline.org>2017-02-08 18:22:14 +0000
commitb332de14b36b03747eec87a58e94cdbd370069f5 (patch)
tree9a40d056d50f08c012143f4e838e8e687ae93bd4 /roles/fedmsg
parentd3cd58ec253a2b19fcd7e7832bfbb2b1568ea37a (diff)
downloadansible-b332de14b36b03747eec87a58e94cdbd370069f5.tar.gz
ansible-b332de14b36b03747eec87a58e94cdbd370069f5.tar.xz
ansible-b332de14b36b03747eec87a58e94cdbd370069f5.zip
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>
Diffstat (limited to 'roles/fedmsg')
-rw-r--r--roles/fedmsg/base/templates/logging.py.j26
1 files changed, 6 insertions, 0 deletions
diff --git a/roles/fedmsg/base/templates/logging.py.j2 b/roles/fedmsg/base/templates/logging.py.j2
index 70cdbc91f..4be3fd991 100644
--- a/roles/fedmsg/base/templates/logging.py.j2
+++ b/roles/fedmsg/base/templates/logging.py.j2
@@ -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"],
+ },
),
)