Skip to content
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

MSI: add log rotation setting #284

Closed
ashie opened this issue Mar 19, 2021 · 10 comments
Closed

MSI: add log rotation setting #284

ashie opened this issue Mar 19, 2021 · 10 comments
Milestone

Comments

@ashie
Copy link
Member

ashie commented Mar 19, 2021

Although the td-agent package for windows automatically set up windows service as of 4.0.0, it doesn't set up log rotation.
We should add default setting for it.

@kenhys
Copy link
Contributor

kenhys commented Apr 22, 2021

In the current version, --reg-winsvc-fluentdopt OPTION is the only way to tell option arguments for fluentdwinsvc.
But modifying the specific registry is not appropriate.

https://github.com/fluent/fluentd/blob/master/lib/fluent/command/fluentd.rb#L320
https://github.com/fluent/fluentd/blob/master/lib/fluent/winsvc.rb#L51

It may be better to customize the behavior via environment variables.

@kenhys
Copy link
Contributor

kenhys commented Apr 22, 2021

https://github.com/fluent/fluentd/blob/master/lib/fluent/winsvc.rb#L52

Adding options explicitly may be a straightforward way.

@kenhys
Copy link
Contributor

kenhys commented Apr 23, 2021

Another idea, it may be useful if <system > section supports it.

<system>
  log_rotate_age 
  log_rotate_size 
</system>

@kenhys
Copy link
Contributor

kenhys commented Apr 23, 2021

It may be better to put it under <log>.

@kenhys
Copy link
Contributor

kenhys commented Apr 23, 2021

PoC
kenhys/fluentd@349bfb4

@ashie
Copy link
Member Author

ashie commented Apr 23, 2021

Another idea, it may be useful if section supports it.

Sounds good.

@kenhys
Copy link
Contributor

kenhys commented Apr 23, 2021

If supporting rotate configuration via fluentd.conf as an option (more general approach, I think)

TODO:

  • make configurable via system_config.log.rotate_... in <system><log> ... </log></system> (lib/fluent/system_config.rb)
  • fix apply options (lib/fluent/supervisor.rb)
  • modify logger to pass these options, maybe need to take care of DeamonLogger (lib/fluent/log.rb)

@kenhys
Copy link
Contributor

kenhys commented Apr 26, 2021

In supervisor, it may be better to parse 2-pass with/without additional_config.

@kenhys kenhys closed this as completed Apr 26, 2021
@kenhys kenhys reopened this Apr 26, 2021
@ashie ashie added this to the 4.2.0 milestone Apr 26, 2021
@kenhys
Copy link
Contributor

kenhys commented Apr 26, 2021

I'm working on fluent/fluentd#3352 It is under development.

@kenhys
Copy link
Contributor

kenhys commented May 7, 2021

It is not MSI specific feature #284 (comment) , so I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants