Skip to content

Commit 68f231e

Browse files
author
Robert Breker
committed
CP-11222: Improve logging format - add datetime to logging output
Also drop the static name from the output as we now use a dedicated file. Signed-off-by: Robert Breker <[email protected]>
1 parent b0d1484 commit 68f231e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/xscontainer/util/log.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
def configurelogging():
1515
_LOGGER.setLevel(logging.DEBUG)
1616
formatter = logging.Formatter(
17-
'xscontainer[%(process)d] - %(levelname)s - %(message)s')
17+
'%(asctime)s - [%(process)d] - %(levelname)s - %(message)s',
18+
'%Y-%m-%d %H:%M:%S')
1819
fileh = logging.FileHandler(LOG_FILE)
1920
fileh.setFormatter(formatter)
2021
_LOGGER.addHandler(fileh)

0 commit comments

Comments
 (0)