0

flushing due to time since last flush 9.060s > max_flush_time 9.060s

I 'm getting tone of those message in django debug.

I tried changing to their default setting

LOGGING = {
    'version': 1,
    'disable_existing_loggers': True,
    'formatters': {
        'verbose': {
            'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
        },
    },
    'handlers': {
        'elasticapm': {
            'level': 'WARNING',
            'class': 'elasticapm.contrib.django.handlers.LoggingHandler',
        },
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
            'formatter': 'verbose'
        }
    },
    'loggers': {
        'django.db.backends': {
            'level': 'ERROR',
            'handlers': ['console'],
            'propagate': False,
        },
        'mysite': {
            'level': 'WARNING',
            'handlers': ['elasticapm'],
            'propagate': False,
        },
        # Log errors from the Elastic APM module to the console (recommended)
        'elasticapm.errors': {
            'level': 'ERROR',
            'handlers': ['console'],
            'propagate': False,
        },
    },
}

Still getting lots of logs. How to turn this off?

eugene
  • 39,839
  • 68
  • 255
  • 489
  • Looks like it is using [DEBUG level](https://github.com/elastic/apm-agent-python/blob/master/elasticapm/transport/base.py#L150) logging, so manipulating the logging level for that logger should do the job. Did you try that? – Nikolay Vasiliev Nov 16 '19 at 13:14
  • Hmm, usually users have a hard time seeing the logs from the agent, not hiding the logs! There's now a [troubleshooting doc](https://www.elastic.co/guide/en/apm/agent/python/master/troubleshooting.html) for some of these issues. If you're still having this issue I recommend [opening an issue](https://github.com/elastic/apm-agent-python/issues). – Colton Myers Mar 16 '20 at 17:04

0 Answers0