2016-04-22 10:09:20 +02:00
|
|
|
#!/usr/bin/python3
|
|
|
|
|
2017-11-22 23:36:04 +01:00
|
|
|
import time
|
2016-04-22 10:09:20 +02:00
|
|
|
import datetime
|
|
|
|
|
2017-12-10 19:04:31 +01:00
|
|
|
from ffmap.config import CONFIG
|
|
|
|
|
2016-04-22 10:09:20 +02:00
|
|
|
def utcnow():
|
|
|
|
return datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc)
|
2017-11-22 23:36:04 +01:00
|
|
|
|
|
|
|
def writelog(path, content):
|
|
|
|
with open(path, "a") as csv:
|
|
|
|
csv.write(time.strftime('{%Y-%m-%d %H:%M:%S}') + " - " + content + "\n")
|
2017-12-10 19:04:31 +01:00
|
|
|
|
|
|
|
def writefulllog(content):
|
|
|
|
with open(CONFIG["debug_dir"] + "/fulllog.log", "a") as csv:
|
|
|
|
csv.write(time.strftime('{%Y-%m-%d %H:%M:%S}') + " - " + content + "\n")
|