CORD-2101: Make errors appear with stack traces, even when they occur
outside of XOS, e.g. GRPC.
Change-Id: I79c7da619e5eab0fad3bb8656f02c91ce7f8a32c
diff --git a/multistructlog.py b/multistructlog.py
index 6d2b724..bf0a27f 100644
--- a/multistructlog.py
+++ b/multistructlog.py
@@ -46,7 +46,8 @@
PROCESSOR_MAP = {
'StreamHandler': structlog.dev.ConsoleRenderer(),
- 'LogstashHandler': structlog.processors.JSONRenderer()
+ 'LogstashHandler': structlog.processors.JSONRenderer(),
+ 'RotatingFileHandler': structlog.processors.JSONRenderer()
}
@@ -70,7 +71,7 @@
self.handlers = handlers
def __call__(self):
- base_logger = logging.getLogger()
+ base_logger = logging.getLogger("multistructlog")
base_logger.handlers = []
for h in self.handlers:
formatter = FormatterFactory(h.__class__.__name__)()