Closed BeeStingBob closed 1 year ago
I'm getting behaviour where I send one message but graylog receives multiple, and the number received by graylog can incrementally increase with each message sent. Example, each blue bar should be one message.
initialised with
class BehaveLogger(): def __init__(self): self.logger = logging.getLogger(FACILITY) self.logger.setLevel(logging.INFO) handler = graypy.GELFUDPHandler(self.host, self.port, debugging_fields=True) self.logger.addHandler(handler) self.adapter = logging.LoggerAdapter(logging.getLogger(FACILITY), {'Project_ID': PROJECT_ID, 'Job_Name': JOB_NAME, }) def log_generic(self, doc): self.adapter.info(json.dumps(doc))
called with
from grayloglogger.grayloglogger import BehaveLogger self.logger = BehaveLogger() for job_trace in job_traces(): self.logger.log_generic(job_trace)
any thoughts would be appreciated?
looks like I might have been adding extra handlers .... https://stackoverflow.com/questions/37134573/python-logging-duplicates-the-log-messages
I'm getting behaviour where I send one message but graylog receives multiple, and the number received by graylog can incrementally increase with each message sent. Example, each blue bar should be one message.
initialised with
called with
any thoughts would be appreciated?