Skip to content

Commit

Permalink
Fixes Issue oliverjrose99#73 Add Filename, Line number, and Method na…
Browse files Browse the repository at this point in the history
…me to logger format

Added Filename, Line number, and Method name to logger format
  • Loading branch information
leet86 committed Sep 15, 2022
1 parent 1b245d0 commit d1341b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recordurbate/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def __init__(self):
fh = logging.FileHandler(self.logfile)
fh.setLevel(logging.DEBUG)

fh.setFormatter(logging.Formatter("%(asctime)s - %(message)s"))
FORMAT = "[%(asctime)s %(filename)s:%(lineno)s - %(funcName)s()]- %(message)s"
fh.setFormatter(logging.Formatter(FORMAT))
self.logger.addHandler(fh)

def daemonize(self):
Expand Down

0 comments on commit d1341b8

Please sign in to comment.