-
Notifications
You must be signed in to change notification settings - Fork 1.8k
add logrotate out plugin (#2) #10824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should provide a YAML version too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I didn't see other configs. let me know where can I put it. anyway in fluent-bit-docs I'll list both options |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[SERVICE] | ||
Flush 1 | ||
Log_Level info | ||
Parsers_File parsers.conf | ||
|
||
[INPUT] | ||
Name dummy | ||
Tag test.logrotate | ||
Dummy {"message": "test log message", "level": "info"} | ||
Rate 10 | ||
|
||
[OUTPUT] | ||
Name logrotate | ||
Match test.logrotate | ||
Path /tmp/logs | ||
File test.log | ||
Format json | ||
Max_Size 10M | ||
Max_Files 5 | ||
Gzip On | ||
Mkdir On |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
set(src | ||
logrotate.c) | ||
|
||
find_package(ZLIB REQUIRED) | ||
FLB_PLUGIN(out_logrotate "${src}" "${ZLIB_LIBRARIES}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this build for all targets including macOS and Windows? They may need configuring via their specific cmake/ config files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the logrotate plugin is actually a fork of the
out_file
with gzip and couple of move/copy files.I've matched all cmakes to be the same as the
out_file