If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Update logging config for sumo -dev, -stage, -prod

RESOLVED WONTFIX

Status

Infrastructure & Operations
WebOps: Other
--
major
RESOLVED WONTFIX
5 years ago
4 years ago

People

(Reporter: rrosario, Unassigned)

Tracking

Details

(Reporter)

Description

5 years ago
We are now using the dictConfig logging configuration for Django. We need to add the following to settings_local.py on -dev, -prod and -stage. This must be declared sometime after the SYSLOG_TAG setting. Feel free to modify the configuration as needed/wanted.


LOGGING = {
    'version': 1,
    'disable_existing_loggers': True,
    'formatters': {
        'default': {
            'format': '{0}: %(asctime)s %(name)s:%(levelname)s %(message)s: '
                      '%(pathname)s:%(lineno)s'.format(SYSLOG_TAG),
            'datefmt': '%H:%M:%S' if DEBUG else None,
        }
    },
    'handlers': {
        'syslog': {
            'class': 'logging.handlers.SysLogHandler',
            'formatter': 'default',
            'facility': logging.handlers.SysLogHandler.LOG_LOCAL7,
        },
        'console': {
            'class': 'logging.StreamHandler',
            'formatter': 'default',
        },
    },
    'loggers': {
        'k': {
            'handlers': ['console' if DEBUG else 'syslog'],
            'propogate': True,
            'level': logging.INFO,
        }
    },
}
(Reporter)

Updated

5 years ago
Blocks: 750247
(Reporter)

Comment 1

5 years ago
We changed are mind on how we are doing this. We might not need any settings_local.py changes. WONTFIXing for now.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
You need to log in before you can comment on or make changes to this bug.