AnushaGHerale commented on issue #2167: URL: https://github.com/apache/logging-log4j2/issues/2167#issuecomment-1879705855
Hi Matt Sicker, Thanks for the response. I tried with the 2.22.0 version, Still, the issue persists. Regarding the "CachedClock," this was configured just to check if the issue persists with the clock manual setting. Otherwise, by default, we use SystemClock. As we have not mentioned any clock. I will test with 2.22.1 and get back to you. Why do you think, custom LoggerContext can cause some problems? Thanks & Regards Anusha On Sat, Jan 6, 2024 at 1:19 AM Matt Sicker ***@***.***> wrote: > Looking at your log file, I see that some debug logs do indeed have the > unix milliseconds timestamp, but others don't, and that seems odd. The use > of %F is also a little concerning; I'd typically use %c/%logger instead > since that doesn't involve any stack walking to find the location info > about the calling code. > > One thing that may be an issue here is that you're using CachedClock > instead of the default SystemClock. The cached clock uses a background > thread to update the time once every millisecond (which sort of relies on > the underlying OS scheduler to support timers with a granularity that > small; some OSes will only go as low as 10 ms or 16ms or somewhere around > there) while the system clock just invokes System::currentTimeMillis > every time. Since this log file is for debug logs, it might be that the log > messages are being logged faster than the cached clock is updating itself, > but then I'd expect the results to be the same timestamp being used (and > not 0). > > Another thing is that you're using a custom LoggerContext, though I'm not > sure if that's causing any problems. > > Do you still have this same problem with version 2.22.1? > > — > Reply to this email directly, view it on GitHub > <https://github.com/apache/logging-log4j2/issues/2167#issuecomment-1879182380>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AXAL7TR3RIJ4CPZCDRLFMF3YNBKN5AVCNFSM6AAAAABBOCW4DKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZZGE4DEMZYGA> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> > -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
