Skip to content

Commit

Permalink
Allow logging format message (so we are good with logging docs)
Browse files Browse the repository at this point in the history
  • Loading branch information
utek committed Jun 28, 2017
1 parent 9b60d59 commit d7ee77c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion logdna/logdna.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ 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:
opts = record['args']
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']
}
Expand Down

0 comments on commit d7ee77c

Please sign in to comment.