Menu

logrotatewin doesn't rotate well with %s dateextension

2015-10-15
2015-12-18
  • perditi0n2002

    perditi0n2002 - 2015-10-15

    Hi everyone,

    I'm interested in rotating a log file with a date extension so that it can be rotated more than once a day. For example the log named debug.log would be rotated thusly:

    debug.log-2015-10-15-213412312.2135.txt

    The 213412312.2135 is the %s which is a variable of dateformat (it represents seconds since 1970). The reason I want the %s in the dateformat is so that the same log file can be rotated more than once a day. Using %Y%m%d would allow only daily rotation. I configured the rotate value as 3.

    When using dateformat -%Y-%m-%d-%s.txt the log isn't rotated, it's created but not rotated. I've also tried removing the -%Y-%m-%d- part so that it is only %s. The number of logs created is more than the number configured by the "rotate" parameter. I was wondering whether or not this is a bug and if so is there a workaround.

    I'm using the latest version posted in this forum (0.0.0.16).

    Thanks for your help,
    Mike

     
  • perditi0n2002

    perditi0n2002 - 2015-12-18

    Hello,

    Is there any news regarding this issue?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.