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

Method to trigger re-opening output file #12

Open
bakerkj opened this issue Jun 7, 2016 · 2 comments
Open

Method to trigger re-opening output file #12

bakerkj opened this issue Jun 7, 2016 · 2 comments

Comments

@bakerkj
Copy link

bakerkj commented Jun 7, 2016

@stripydog,

I am logging data collected with kplex to a file. I'd like to use logrotate to move and compress the file and then kplex would reopen a new log file. It would be great if that could happen automatically, or have it happen via a signal.

Any thoughts on making kplex do something like that?

Thanks!

-- Ken

@stripydog
Copy link
Owner

The traditional way for dealing with programs too stupid to do something sensible with SIGHUP is to put "copytruncate" in the logrotate conf file to copy and..err...truncate the file. Alternatively you could restart kplex in a postrotate script.

The suggestion is a good one and I'll keep it here but it won't happen soon. I intend on only doing bug fixes until I've done a substantial re-write on kplex. Signal handling will be one thing which will be completely re-thought so I'll try and work it in.

@bakerkj
Copy link
Author

bakerkj commented Jun 7, 2016

@stripydog thanks!

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