@@ -34,14 +34,16 @@ Fluent::Logger is a structured event logger for Fluent.
34
34
35
35
%args:
36
36
37
- tag_prefix => 'Str': optional
38
- host => 'Str': default is '127.0.0.1'
39
- port => 'Int': default is 24224
40
- timeout => 'Num': default is 3.0
41
- socket => 'Str': default undef (e.g. "/var/run/fluent/fluent.sock")
42
- prefer_integer => 'Bool': default 1 (set to Data::MessagePack->prefer_integer)
43
- event_time => 'Bool': default 0 (timestamp includes nanoseconds, supported by fluentd >= 0.14.0)
44
- buffer_overflow_handler => 'Code': optional
37
+ tag_prefix => 'Str': optional
38
+ host => 'Str': default is '127.0.0.1'
39
+ port => 'Int': default is 24224
40
+ timeout => 'Num': default is 3.0
41
+ socket => 'Str': default undef (e.g. "/var/run/fluent/fluent.sock")
42
+ prefer_integer => 'Bool': default 1 (set to Data::MessagePack->prefer_integer)
43
+ event_time => 'Bool': default 0 (timestamp includes nanoseconds, supported by fluentd >= 0.14.0)
44
+ buffer_limit => 'Int': defualt 8388608 (8MB)
45
+ buffer_overflow_handler => 'Code': optional
46
+ truncate_buffer_at_overflow => 'Bool': default 0
45
47
46
48
- buffer\_ overflow\_ handler
47
49
@@ -51,6 +53,12 @@ Fluent::Logger is a structured event logger for Fluent.
51
53
Your proc should accept a single argument, which will be the internal buffer of messages from the logger.
52
54
A typical use-case for this would be writing to disk or possibly writing to Redis.
53
55
56
+ - truncate\_ buffer\_ at\_ overflow
57
+
58
+ When truncate\_ buffer\_ at\_ overflow is true and pending buffer size is larger than buffer\_ limit, post() returns undef.
59
+
60
+ Pending buffer still be kept, but last message passed to post() is not sent and not appended to buffer. You may handle the message by other method.
61
+
54
62
- ** post** ($tag: Str , $msg: HashRef )
55
63
56
64
Send message to fluent server with tag.
0 commit comments