debian: disable syslog loggers if there's no /dev/log (#36738)
This commit is contained in:
parent
8471bf5e32
commit
4b6ea35bfc
|
@ -167,6 +167,13 @@ if os.path.exists('/run/systemd/journal/socket'):
|
|||
LOGGING['loggers']['']['handlers'].remove('syslog')
|
||||
LOGGING['loggers']['']['handlers'].append('journald')
|
||||
|
||||
elif not os.path.exists('/dev/log'):
|
||||
# if three's no syslog (for example when building a docker image), remove
|
||||
# those loggers.
|
||||
LOGGING['loggers']['']['handlers'].remove('syslog')
|
||||
LOGGING['loggers']['py.warnings']['handlers'].remove('syslog_no_filter')
|
||||
|
||||
|
||||
ETC_DIR = '/etc/%s' % PROJECT_NAME
|
||||
VAR_DIR = '/var/lib/%s' % PROJECT_NAME
|
||||
|
||||
|
|
Loading…
Reference in New Issue