5 Preventing undefined thread ids in child processes
ethanvc edited this page 2020-09-19 22:26:50 +08:00

By default spdlog saves thread ids in thread local storage to gain a few micros for each call, but if your program forks, you must uncomment the SPDLOG_DISABLE_TID_CACHING flag in tweakme.h.

This will prevent undefined thread ids in child log messages:

#define SPDLOG_DISABLE_TID_CACHING