Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time logging once per 20 msgs alternatives #1443

Open
jspaith opened this issue Jan 25, 2024 · 1 comment
Open

Time logging once per 20 msgs alternatives #1443

jspaith opened this issue Jan 25, 2024 · 1 comment
Milestone

Comments

@jspaith
Copy link

jspaith commented Jan 25, 2024

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

@icraggs
Copy link
Contributor

icraggs commented Feb 9, 2024

I think that when I did this the option to turn off tracing altogether didn't exist. I'll think about it.

@icraggs icraggs added this to the 1.3.14 milestone Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants