Commit 58cee237 authored by Mykhailo Dalchenko's avatar Mykhailo Dalchenko
Browse files

Adding user name and timestamp to log name

parent 322e5ebe
Pipeline #2032215 failed with stages
in 3 minutes and 27 seconds
......@@ -20,12 +20,14 @@ try:
except ImportError:
# Try backported to PY<37 `importlib_resources`.
import importlib_resources as pkg_resources
import getpass
import json
import logging
import os
import shlex
import subprocess
import sys
import time
import traceback
from pathlib import Path
......@@ -68,7 +70,7 @@ def setup_logging(verbosity=1):
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
datefmt='%m-%d %H:%M',
filename='/tmp/sim_runner.log',
filename=f'/tmp/sim_runner_{getpass.getuser()}_{time.time()}.log',
filemode='w')
# define a Handler which writes INFO messages or higher to the sys.stderr
console = logging.StreamHandler()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment