Disable Flask logs of metrics calls
We don't need to log every successful /metrics call on INFO level. This commit switches the log level there to WARNING. Change-Id: I3bc0e1c9e312381715f60a00ad8f52dbd601bb2f
This commit is contained in:
parent
fcc71cee92
commit
291821cbf6
@ -46,6 +46,9 @@ class CNIPrometheusExporter(object):
|
||||
return flask.Response(collected_metric, mimetype='text/plain')
|
||||
|
||||
def run(self):
|
||||
# Disable obtrusive werkzeug logs.
|
||||
logging.getLogger('werkzeug').setLevel(logging.WARNING)
|
||||
|
||||
address = '::'
|
||||
try:
|
||||
LOG.info('Starting CNI Prometheus exporter')
|
||||
|
@ -66,6 +66,9 @@ class ControllerPrometheusExporter(object):
|
||||
return ControllerPrometheusExporter.instance
|
||||
|
||||
def run(self):
|
||||
# Disable obtrusive werkzeug logs.
|
||||
logging.getLogger('werkzeug').setLevel(logging.WARNING)
|
||||
|
||||
address = '::'
|
||||
try:
|
||||
LOG.info('Starting Prometheus exporter')
|
||||
|
Loading…
Reference in New Issue
Block a user