示例#1
0
 def __init__(self, app, parentLogName='request', childLogName='application', 
             traceHeaderName=None,labels=None, resource='global'):
     logging.Handler.__init__(self)
     self.app = app
     self.labels=labels
     self.traceHeaderName = traceHeaderName
     self.resource = resource
     self.transport_parent = BackgroundThreadTransport(client, parentLogName)
     self.transport_child = BackgroundThreadTransport(client, childLogName)           
     self.mLogLevels = []
     if app is not None:
         self.init_app(app)
示例#2
0
 def __init__(self, app, parentLogName='request', childLogName='application', 
             traceHeaderName=None,labels=None, resource=None):
     logging.Handler.__init__(self)
     self.app = app
     self.labels=labels
     self.traceHeaderName = traceHeaderName
     if (resource is None):
         resource = _GLOBAL_RESOURCE
     else:
         resource = Resource(type=resource['type'], labels=resource['labels'])
         print(resource)
     self.resource = resource
     self.transport_parent = BackgroundThreadTransport(client, parentLogName)
     self.transport_child = BackgroundThreadTransport(client, childLogName)           
     self.mLogLevels = {}
     if app is not None:
         self.init_app(app)
示例#3
0
 def __init__(self,
              child_log_name='application',
              trace_header_name=None,
              labels=None,
              resource=None):
     logging.Handler.__init__(self)
     self.labels = labels
     self.trace_header_name = trace_header_name
     if resource is None:
         resource = _GLOBAL_RESOURCE
     else:
         resource = Resource(type=resource['type'],
                             labels=resource['labels'])
     self.resource = resource
     self.transport_child = BackgroundThreadTransport(
         client, child_log_name)
     self.mLogLevels = []