mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-10 22:41:53 +08:00
make sure log messages are not zero-length when sent to portal
This commit is contained in:
@@ -53,6 +53,10 @@ class NetworkLogFormatter( logging.Formatter ):
|
||||
}
|
||||
|
||||
def format(self, record):
|
||||
msg = record.msg
|
||||
if msg is None:
|
||||
msg = ' '
|
||||
|
||||
data = {
|
||||
'time': int(time.time()),
|
||||
'level': NetworkLogFormatter.level_names.get(record.levelno, 'TRACE'),
|
||||
|
||||
Reference in New Issue
Block a user