X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fmisc.py;h=0e7e561298d9551af13789c94fb30ed3cdf01514;hp=76f4099e1ec4199f37fbadde4d172d5d47047ed8;hb=b7a0d21774ff74bcf66315a4d14b788263f41dea;hpb=38aff5fc519f55a8b15a7602f34167bcfea3d7f6 diff --git a/mudpy/misc.py b/mudpy/misc.py index 76f4099..0e7e561 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -5,6 +5,7 @@ # provided in the LICENSE file distributed with this software. import codecs +import datetime import os import random import re @@ -986,7 +987,7 @@ def log(message, level=0): file_name = "" max_log_lines = 0 syslog_name = "" - timestamp = time.asctime()[4:19] + timestamp = datetime.datetime.now().isoformat(' ') # turn the message into a list of nonempty lines lines = [x for x in [(x.rstrip()) for x in message.split("\n")] if x != ""]