core (logging): new backend_data parameter can be used to transmit specific data to a backend + Twisted backend use this option to know if we are in debug or nodaemon mode
This commit is contained in:
parent
899e57be46
commit
d549533f00
1 changed files with 11 additions and 16 deletions
|
|
@ -155,7 +155,7 @@ class FilterName(object):
|
|||
class ConfigureBase(object):
|
||||
LOGGER_CLASS = Logger
|
||||
|
||||
def __init__(self, level=None, fmt=None, output=None, logger=None, colors=False, force_colors=False):
|
||||
def __init__(self, level=None, fmt=None, output=None, logger=None, colors=False, force_colors=False, backend_data=None):
|
||||
"""Configure a backend
|
||||
|
||||
@param level: one of C.LOG_LEVELS
|
||||
|
|
@ -168,6 +168,7 @@ class ConfigureBase(object):
|
|||
@param colors: if True use ANSI colors to show log levels
|
||||
@param force_colors: if True ANSI colors are used even if stdout is not a tty
|
||||
"""
|
||||
self.backend_data = backend_data
|
||||
self.preTreatment()
|
||||
self.configureLevel(level)
|
||||
self.configureFormat(fmt)
|
||||
|
|
|
|||
Loading…
Reference in a new issue