Skip to content

Commit b6a7c6e

Browse files
committed
fix: logging
1 parent 431bdf6 commit b6a7c6e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/vsc/utils/nagios.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def _real_exit(message, code, metrics=''):
8787
metrics = '|%s' % message[1]
8888
if len(msg) > NAGIOS_MAX_MESSAGE_LENGTH:
8989
# log long message but print truncated message
90-
log.info("Nagios report %s: %s%s", exit_text, msg, metrics)
90+
logging.info("Nagios report %s: %s%s", exit_text, msg, metrics)
9191
msg = msg[:NAGIOS_MAX_MESSAGE_LENGTH-3] + '...'
9292

9393
print("%s %s%s" % (exit_text, msg, metrics))
@@ -259,8 +259,6 @@ def __init__(self, header, filename, threshold, nagios_username="nagios", world_
259259

260260
self.nagios_username = nagios_username
261261

262-
logging = getLogger(self.__class__.__name__, fname=False)
263-
264262
def report_and_exit(self):
265263
"""Unzips the cache file and reads the JSON data back in, prints the data and exits accordingly.
266264

0 commit comments

Comments
 (0)