From 0b54cd46238da37c476747513538eddddf62287b Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Feb 27 2014 15:01:09 +0000 Subject: Make that ContextInjector thing jsonifiable. --- diff --git a/roles/fedmsg_base/templates/logging.py.j2 b/roles/fedmsg_base/templates/logging.py.j2 index 1f1ccb8..c2d634b 100644 --- a/roles/fedmsg_base/templates/logging.py.j2 +++ b/roles/fedmsg_base/templates/logging.py.j2 @@ -61,6 +61,11 @@ class ContextInjector(logging.Filter): # This should be impossible. raise ValueError("Could not find process %r" % mypid) + @classmethod + def __json__(cls): + """ We need to be jsonifiable for "fedmsg-config" """ + return {'name': 'ContextInjector'} + current_process = ContextInjector.get_current_process() current_hostname = socket.gethostname()