]> arthur.barton.de Git - netdata.git/blobdiff - python.d/python_modules/msg.py
show what prevented logging
[netdata.git] / python.d / python_modules / msg.py
index ef6d933480572bd7455188b489c8eb652e1f377b..e10819c28432b3fe53e739e438f233817fc606a5 100644 (file)
@@ -24,7 +24,7 @@ def log_msg(msg_type, *args):
         LOG_COUNTER -= 1
     now = time()
     if LOG_COUNTER >= 0:
-        timestamp = strftime('%y-%m-%d %X')
+        timestamp = strftime('%Y-%m-%d %X')
         msg = "%s: %s %s: %s" % (timestamp, PROGRAM, str(msg_type), " ".join(args))
         WRITE(msg + "\n")
         FLUSH()
@@ -33,7 +33,8 @@ def log_msg(msg_type, *args):
     if NEXT_CHECK <= now:
         NEXT_CHECK = now - (now % LOG_INTERVAL) + LOG_INTERVAL
         if LOG_COUNTER < 0:
-            msg = "Prevented %s log messages from displaying" % str(0 - LOG_COUNTER)
+            timestamp = strftime('%Y-%m-%d %X')
+            msg = "%s: python.d.plugin: Prevented %s log messages from displaying" % (timestamp, str(0 - LOG_COUNTER))
             WRITE(msg + "\n")
             FLUSH()