Skip to content

Commit

Permalink
Merge pull request python-diamond#127 from jaingaurav/log
Browse files Browse the repository at this point in the history
Add the process PID in the logs
  • Loading branch information
josegonzalez committed Mar 11, 2015
2 parents 39d9ff0 + 8b275cc commit eb224b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/diamond/utils/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
class DebugFormatter(logging.Formatter):
def __init__(self, fmt=None):
if fmt is None:
fmt = '%(created)s\t[%(processName)s:%(levelname)s]\t%(message)s'
fmt = ('%(created)s\t' +
'[%(processName)s:%(process)d:%(levelname)s]\t' +
'%(message)s')
self.fmt_default = fmt
self.fmt_prefix = fmt.replace('%(message)s', '')
logging.Formatter.__init__(self, fmt)
Expand Down

0 comments on commit eb224b7

Please sign in to comment.