projects
/
mudpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use ISO 8601 time in logs
[mudpy.git]
/
mudpy
/
misc.py
diff --git
a/mudpy/misc.py
b/mudpy/misc.py
index
76f4099
..
0e7e561
100644
(file)
--- a/
mudpy/misc.py
+++ b/
mudpy/misc.py
@@
-5,6
+5,7
@@
# provided in the LICENSE file distributed with this software.
import codecs
# provided in the LICENSE file distributed with this software.
import codecs
+import datetime
import os
import random
import re
import os
import random
import re
@@
-986,7
+987,7
@@
def log(message, level=0):
file_name = ""
max_log_lines = 0
syslog_name = ""
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 != ""]
# turn the message into a list of nonempty lines
lines = [x for x in [(x.rstrip()) for x in message.split("\n")] if x != ""]