Skip to content

Commit

Permalink
Update format string for json logger
Browse files Browse the repository at this point in the history
Copied from spreaker#42
  • Loading branch information
Alan Braggins authored and abraggins-vadc committed May 5, 2022
1 parent 4bba2c2 commit 683879a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prometheus_pgbouncer_exporter/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def main():

# Init logger
logHandler = logging.FileHandler(args.log_file) if args.log_file is not "stdout" else logging.StreamHandler()
formatter = jsonlogger.JsonFormatter("(asctime) (levelname) (message)", datefmt="%Y-%m-%d %H:%M:%S")
formatter = jsonlogger.JsonFormatter("%(asctime)s %(levelname)s %(message)s`", datefmt="%Y-%m-%d %H:%M:%S")
logHandler.setFormatter(formatter)
logging.getLogger().addHandler(logHandler)
logging.getLogger().setLevel(args.log_level)
Expand Down

0 comments on commit 683879a

Please sign in to comment.