+print cdist version on startup + exit_code = 2 for irq
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
parent
408d89433b
commit
74e003d29b
2 changed files with 4 additions and 14 deletions
|
|
@ -23,21 +23,15 @@
|
|||
import logging
|
||||
|
||||
class Log(logging.Logger):
|
||||
"""Hold information about current context"""
|
||||
|
||||
def __init__(self, name):
|
||||
|
||||
# Context logging
|
||||
self.name = name
|
||||
|
||||
# Init real logger
|
||||
super().__init__(name)
|
||||
|
||||
# Add ourselves as a filter
|
||||
self.addFilter(self)
|
||||
|
||||
def filter(self, record):
|
||||
"""Add hostname to logs via logging Filter"""
|
||||
"""Prefix messages with logger name"""
|
||||
|
||||
record.msg = self.name + ": " + str(record.msg)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue