Skip to content

Commit 030d386

Browse files
author
Reinhard Tartler
committed
Expose nanosecond_precision flag in FluentHandler
This allows easy access to the nanosecond precision functionality when used as logging handler.
1 parent 1c69535 commit 030d386

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fluent/handler.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,15 @@ def __init__(self,
136136
port=24224,
137137
timeout=3.0,
138138
verbose=False,
139-
buffer_overflow_handler=None):
139+
buffer_overflow_handler=None,
140+
nanosecond_precision=False):
140141

141142
self.tag = tag
142143
self.sender = sender.FluentSender(tag,
143144
host=host, port=port,
144145
timeout=timeout, verbose=verbose,
145-
buffer_overflow_handler=buffer_overflow_handler)
146+
buffer_overflow_handler=buffer_overflow_handler,
147+
nanosecond_precision=nanosecond_precision)
146148
logging.Handler.__init__(self)
147149

148150
def emit(self, record):

0 commit comments

Comments
 (0)