Closed
Description
I wasn't able to pass extra fields. Have you tested such:
from fluent import handler
custom_format = {
'host': '%(hostname)s',
'where': '%(module)s.%(funcName)s',
'type': '%(levelname)s',
'stack_trace': '%(exc_text)s'
}
log = logging.getLogger('fluent.test')
log.setLevel(logging.DEBUG)
h = handler.FluentHandler('app.python', host='127.0.0.1', port=24224)
formatter = handler.FluentRecordFormatter(custom_format)
h.setFormatter(formatter)
log.addHandler(h)
log.debug('python fluent log test', extra={'extraField': 'test'} )
on the last line I am expecting fluentd(td-agent) to pass the extraField into the collector.
Is there sth I'm missing?
Metadata
Metadata
Assignees
Labels
No labels