[Zeek-Dev] Proposal: Make Zeek's debug logging thread-safe

Jon Siwek jsiwek at corelight.com
Mon Jul 13 13:42:03 PDT 2020


On Fri, Jul 10, 2020 at 11:00 AM Bob Murphy <bob.murphy at corelight.com> wrote:

> The development I was doing sometimes required me to examine the debug messages from different threads in the chronological order they were generated. But if I understand it correctly, the threading framework’s logging doesn’t maintain that ordering.

Yeah, or at least the time associated with a Debug message is its
time-of-processing, not time-of-generation.  Can see how the latter is
more useful, but want to discuss the proposed solution with a bit more
detail?  Does it involve a locked mutex around only the underlying
fprintf() or something more? I imagine it should be "something more"
if the requirement is to make debug.log a convenient way of
understanding operation ordering among many threads.

- Jon



More information about the Zeek-Dev mailing list