Skip to content
Snippets Groups Projects
Commit 55101504 authored by Hans Fangohr's avatar Hans Fangohr
Browse files

simplify date format in log file

- full date is in file name
- can just use the time in here (could also remove that)
parent 0f73ea2c
No related branches found
No related tags found
1 merge request!30Print log
Pipeline #369880 passed
......@@ -131,7 +131,7 @@ def set_up_logging(loglevel="warning", filename=None):
if filename:
file_handler = logging.FileHandler(filename)
file_logging_format = "%(asctime)s %(levelname)7s %(lineno)4d | %(message)s"
file_formatter = logging.Formatter(file_logging_format)
file_formatter = logging.Formatter(file_logging_format, datefmt="[%X]")
file_handler.setFormatter(file_formatter)
logger.addHandler(file_handler)
......@@ -704,7 +704,7 @@ def main():
args = parser.parse_args()
# parse logging first
set_up_logging(args.loglevel)
set_up_logging(args.loglevel, filename="test.log")
# target dir is the place where this script exists. the
# release `dev` in script_dir/dev-23a
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment