Menu

#5 Logrotate refresh cycle

closed
D. Lehne
None
1
2014-12-15
2014-11-13
D. Lehne
No

Hello,

i fixed the following problem. The logrotate refresh the file statistic only once at the beginning. The timeout managment with thread restart refresh also the file statistic, but only after 10s timeout with no log activity on the file. So in case that a Application is logging without interruption to a destination file it will increase unlimited.

The fix is made by a simply activity counter, set actually to 5000 until to refresh the file statistic and initiate a rotate. This results, depending on print length, in my case at least a 500kB log file size overhead until the refresh is initiate, but better once then never.

Since version 0.3 is buggy i only made a patch but didn't run tests. Actually working and tested on version 0.1.

The patch is applied after an other patch fixing the windows line feed problem.

Best regards
Daniel Lehne

2 Attachments

Related

Feature Requests: #5

Discussion

  • Alexander Yaworsky

    Hello,

    I added you to admins of this project. Feel free to make next release.

    Unfortunately, I haven't written anything for windows for last 3+ years.

    Alexander.

    2014-11-13 13:11 GMT+06:00 D. Lehne lehned@users.sf.net:


    [feature-requests:#5] Logrotate refresh cycle

    Status: open
    Group: Next_Release_(example)
    Created: Thu Nov 13, 2014 07:11 AM UTC by D. Lehne
    Last Updated: Thu Nov 13, 2014 07:11 AM UTC
    Owner: nobody

    Hello,

    i fixed the following problem. The logrotate refresh the file statistic only
    once at the beginning. The timeout managment with thread restart refresh
    also the file statistic, but only after 10s timeout with no log activity on
    the file. So in case that a Application is logging without interruption to a
    destination file it will increase unlimited.

    The fix is made by a simply activity counter, set actually to 5000 until to
    refresh the file statistic and initiate a rotate. This results, depending on
    print length, in my case at least a 500kB log file size overhead until the
    refresh is initiate, but better once then never.

    Since version 0.3 is buggy i only made a patch but didn't run tests.
    Actually working and tested on version 0.1.

    The patch is applied after an other patch fixing the windows line feed
    problem.

    Best regards
    Daniel Lehne


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/syslog-win32/feature-requests/5/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Feature Requests: #5

  • D. Lehne

    D. Lehne - 2014-12-13
    • status: open --> accepted
    • assigned_to: D. Lehne
     
  • D. Lehne

    D. Lehne - 2014-12-15

    fixed in revision 86
    The size will marked by written bytes to file, but the verification is done after writing a coup of messages, so it could exceed the maximum size until fifo_cs is finished. So maximum overwrite depends on filled fifo size to process.

    Need may a better solution, but for first test is usable and better than unlimited expanding of logfile.

     
  • D. Lehne

    D. Lehne - 2014-12-15
    • status: accepted --> closed
     

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.