Return now() in Apache Common Log Format (no timezone).
(self)
| 286 | self(traceback=True) |
| 287 | |
| 288 | def time(self): |
| 289 | """Return now() in Apache Common Log Format (no timezone).""" |
| 290 | now = datetime.datetime.now() |
| 291 | monthnames = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', |
| 292 | 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'] |
| 293 | month = monthnames[now.month - 1].capitalize() |
| 294 | return ('[%02d/%s/%04d:%02d:%02d:%02d]' % |
| 295 | (now.day, month, now.year, now.hour, now.minute, now.second)) |
| 296 | |
| 297 | def _get_builtin_handler(self, log, key): |
| 298 | for h in log.handlers: |