WISVCH/dienst2

Better error logging

Closed this issue · 1 comments

Instead of mailing, e.g. send them to Datadog or Sentey or ... and do alerting there.

This is a start for console logging:

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
      'simple': {
            'format': '%(asctime)s %(levelname)s %(name)s.%(funcName)s:%(lineno)s %(message)s'
        },
    },
    'handlers': {
        'console': {
            'class': 'logging.StreamHandler',
            'formatter': 'simple',
        },
    },
    'loggers': {
        'django': {
            'handlers': ['console'],
            'level': 'INFO',
        },
        'dienst2': {
            'handlers': ['console'],
            'level': 'DEBUG',
        },
    },
}