You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great catch. This may be a bit hard to fix tho' - 'cos we wait until all the data has come for the full minute/hour. And this means a race condition between Speed4j and the logging library, which we lose. So I don't know if there's a good way to solve this really...
I'm using speed4j with logback.
PeriodicalLog myLog = new PeriodicalLog();
myLog.setPeriod(3600);
Every hour stats recorded to nws log file using Logback and every day file rolled over.
<appender name="statLogFile" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>/stat/nws.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>/stat/nws_%d{yyyyMMdd}.log.gz</fileNamePattern> <maxHistory>30</maxHistory> </rollingPolicy> <encoder> <pattern>%msg%n</pattern> </encoder> </appender>
However looks like last hour of the day always transferred to next day log file and not rolled over in time like this:
Statistics from Wed Dec 11 23:00:00 UTC 2013 to Thu Dec 12 00:00:00 UTC 2013
Tag Avg(ms) Min Max Std Dev
StatusOp_1:failure 104.55 104.13 106.27 52.17
Statistics from Thu Dec 12 00:00:00 UTC 2013 to Thu Dec 12 01:00:00 UTC 2013
Tag Avg(ms) Min Max Std Dev
StatusOp_1:failure 104.82 104.07 140.47 52.36
Statistics from Thu Dec 12 01:00:00 UTC 2013 to Thu Dec 12 02:00:00 UTC 2013
Tag Avg(ms) Min Max Std Dev
StatusOp_1:failure 104.31 104.01 105.01 52.03
Statistics from Thu Dec 12 02:00:00 UTC 2013 to Thu Dec 12 03:00:00 UTC 2013
Tag Avg(ms) Min Max Std Dev
StatusOp_1:failure 104.23 103.94 105.08 52.01
Is there any way to make sure data flushed BEFORE file rolled over?
The text was updated successfully, but these errors were encountered: