From d7ee77c73e5998baf08e9f606ff2a86259227481 Mon Sep 17 00:00:00 2001 From: Lukasz Boldys Date: Wed, 28 Jun 2017 11:46:23 -0700 Subject: [PATCH] Allow logging format message (so we are good with logging docs) --- logdna/logdna.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/logdna/logdna.py b/logdna/logdna.py index 1644a2c..1562eb2 100644 --- a/logdna/logdna.py +++ b/logdna/logdna.py @@ -62,6 +62,7 @@ def flush(self): logger.error('Error in request to LogDNA: ' + str(e)) def emit(self, record): + msg = self.format(record) record = record.__dict__ opts = {} if 'args' in record: @@ -69,7 +70,7 @@ def emit(self, record): message = { 'hostname' : self.hostname, 'timestamp': int(time.time()), - 'line': record['msg'], + 'line': msg, 'level': record['levelname'] or self.level, 'app': self.app or record['module'] }