3 ms·
I use some sort of logging a lot. In general it works pretty well, however there are some situations where it can cause problems. Outputting text to the screen,
by cshipley 15y ago
I use some sort of logging a lot. In general it works pretty well, however there are some situations where it can cause problems. Outputting text to the screen, or a file is a relatively expensive operation, so it can screw up timing because it can be slow, or cause context switches. (Which can screw up trying to debug some multi-threaded issues such as deadlock, or resource access.)
Back in m C++ days, I finally created a fast "output queue" which would contain my tracing strings, then a separate thread would read those and output to wherever. That way, the tracing thread would not be _as_ affected by timing issues.