kplex icon indicating copy to clipboard operation
kplex copied to clipboard

Method to trigger re-opening output file

Open bakerkj opened this issue 8 years ago • 2 comments

@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

bakerkj avatar Jun 07 '16 01:06 bakerkj

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.

stripydog avatar Jun 07 '16 08:06 stripydog

@stripydog thanks!

bakerkj avatar Jun 07 '16 19:06 bakerkj