2

spdlog can log threadid by doing:

spdlog::set_pattern("*** [%H:%M:%S %z] [thread %t] %v ***");

But how can I log the pid(process id)?

worpet
  • 3,788
  • 2
  • 31
  • 53
swtybb
  • 31
  • 5

1 Answers1

2

This is already supported in latest versions, using the %P flag.

GabiMe
  • 18,105
  • 28
  • 76
  • 113