Logfile changed

This commit is contained in:
2018-09-25 20:34:14 +02:00
parent b856be4e66
commit 7ed685e682

View File

@@ -46,7 +46,7 @@ class CanListener (can.Listener):
Loglevel 9 = print to console
"""
if self.loglevel == 9:
print (msg)
print ("%4d-%02d-%02d %02d:%02d:%02d.%06d: " %(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.microsecond) + msg)
if _level <= self.loglevel:
file = open ("/var/log/lactor/" + os.getcwd().split('/')[-1] + '.err', "a")
dt = datetime.now ()