Changeset 2168
- Timestamp:
- 03/30/09 11:21:35
- Files:
-
- branches/python3/cherrypy/_cplogging.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/python3/cherrypy/_cplogging.py
r2158 r2168 7 7 logfmt = logging.Formatter("%(message)s") 8 8 import os 9 import rfc8229 import email.utils 10 10 import sys 11 11 … … 108 108 """Return now() in Apache Common Log Format (no timezone).""" 109 109 now = datetime.datetime.now() 110 month = rfc822._monthnames[now.month - 1].capitalize() 110 monthnames = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 111 'aug', 'sep', 'oct', 'nov', 'dec', 112 'january', 'february', 'march', 'april', 'may', 'june', 'july', 113 'august', 'september', 'october', 'november', 'december'] 114 month = monthnames[now.month - 1].capitalize() 111 115 return ('[%02d/%s/%04d:%02d:%02d:%02d]' % 112 116 (now.day, month, now.year, now.hour, now.minute, now.second))

