blob: fdef0910e774e8e54edb544e463bf69ec40d0982 [file] [log] [blame]
import os
import sys
import datetime
def _log(x):
dt_str = datetime.datetime.now().strftime("%H:%M:%S")
pref = dt_str + " " + str(os.getpid()) + " >>>> "
sys.stderr.write(pref + x.replace("\n", "\n" + pref) + "\n")
logger = _log
def log(x):
logger(x)
def setlogger(nlogger):
global logger
logger = nlogger