When setting up a python logger, what is the proper way to change the APM logging level to something other than the default? We don't want the metrics submission messages logged in prod:
Sent request, url=http://apm-server.default.svc.cluster.local:8200/v1/transactions size=0.56kb status=202
We currently have a logger config like this (using structlog but I think that's not consequential here), so can we just add the change in loggers
?
logging.config.dictConfig({
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'json': {
'format': '%(message)s %(lineno)d %(pathname)s',
'class': 'pythonjsonlogger.jsonlogger.JsonFormatter'
}
},
'handlers': {
'json': {
'class': 'logging.StreamHandler',
'formatter': 'json'
}
},
'loggers': {
'': {
'handlers': ['json'],
'level': LOG_LEVEL
},
'elasticapm': {
'level': 'logging.WARNING',
'propagate': False,
},
}
})