mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
Merge pull request #9724 from ryanpetrello/timey-whimey
fix up a bug in rsyslogd error handling @kdelee I'm unclear on why this is actually happening, so I'm just gonna cheat and generate a datestring Reviewed-by: Elijah DeLee <kdelee@redhat.com>
This commit is contained in:
commit
ffdce7b1d0
@ -5,6 +5,7 @@
|
||||
import logging
|
||||
import sys
|
||||
import traceback
|
||||
from datetime import datetime
|
||||
|
||||
# Django
|
||||
from django.conf import settings
|
||||
@ -34,7 +35,8 @@ class RSysLogHandler(logging.handlers.SysLogHandler):
|
||||
# because the alternative is blocking the
|
||||
# socket.send() in the Python process, which we definitely don't
|
||||
# want to do)
|
||||
msg = f'{record.asctime} ERROR rsyslogd was unresponsive: '
|
||||
dt = datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')
|
||||
msg = f'{dt} ERROR rsyslogd was unresponsive: '
|
||||
exc = traceback.format_exc()
|
||||
try:
|
||||
msg += exc.splitlines()[-1]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user