mirror of
https://github.com/ansible/awx.git
synced 2026-06-26 08:58:03 -02:30
Configure rsyslog to listen over a unix domain socket instead of a port
- Add a placeholder rsyslog.conf so it doesn't fail on start - Create access restricted directory for unix socket to be created in - Create RSyslogHandler to exit early when logging socket doesn't exist - Write updated logging settings when dispatcher comes up and restart rsyslog so they take effect - Move rsyslogd to the web container and create rpc supervisor.sock - Add env var for supervisor.conf path
This commit is contained in:
committed by
Christian Adams
parent
f8afae308a
commit
c0af3c537b
@@ -3,10 +3,20 @@
|
||||
|
||||
# Python
|
||||
import logging
|
||||
import os.path
|
||||
|
||||
# Django
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class RSysLogHandler(logging.handlers.SysLogHandler):
|
||||
|
||||
def emit(self, msg):
|
||||
if not os.path.exists(settings.LOGGING_SOCK):
|
||||
return
|
||||
return super(RSysLogHandler, self).emit(msg)
|
||||
|
||||
|
||||
ColorHandler = logging.StreamHandler
|
||||
|
||||
if settings.COLOR_LOGS is True:
|
||||
|
||||
Reference in New Issue
Block a user