Time logging once per 20 msgs alternatives
jspaith opened this issue · 1 comments
Currently when logging is enabled, the time is output only one of 20 messages. Here.
This initially confused me since it's not standard logging behavior. It was a bit further complicated since we're going through the Rust wrapper. I also had conflicting time stamps from Docker container the code was running in, which made me question the clocks generally until I dug into the underlying source.
I'm aware of this for future debugging so I won't be confused. Still, this makes debugging timing situations and correlating other events in system challenging since the Paho log time doesn't match. I'd trade off the perf penalty to get accurate times.
Is your feature request related to a problem? Please describe.
Per above, problem is being thrown seeing logs all have same times.
Describe the solution you'd like
- Ideally -- seeing if the comment about the sys calls for time is still true and if not, removing the modulo check. Or to be honest, it'd have to be really bad for me to be bothered with it called per log message since logging is configurable.
- Or alternately, making it so that time being output in logs is an option, ideally set at runtime or with an #ifdef / CMake flag if not.
Describe alternatives you've considered
See above
Additional context
N/A
I think that when I did this the option to turn off tracing altogether didn't exist. I'll think about it.