Add timestamp when logging to file
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
d38907dc35
commit
28a066e79a
1 changed files with 2 additions and 1 deletions
|
@ -66,7 +66,8 @@ def validate_config(config):
|
||||||
|
|
||||||
|
|
||||||
def setup_logging(args):
|
def setup_logging(args):
|
||||||
logging.basicConfig(format='%(levelname)s: %(message)s', level=args.loglevel, filename=args.logfile)
|
log_format = '%(asctime)s %(levelname)s: %(message)s' if args.logfile else '%(levelname)s: %(message)s'
|
||||||
|
logging.basicConfig(format=log_format, level=args.loglevel, filename=args.logfile)
|
||||||
|
|
||||||
|
|
||||||
def markdown_escape(text):
|
def markdown_escape(text):
|
||||||
|
|
Loading…
Reference in a new issue