plog icon indicating copy to clipboard operation
plog copied to clipboard

When I initialize plog with the same file in three dynamic libraries and load them, it occurs overwrite phenomenon.

Open zj1838277795 opened this issue 4 years ago • 1 comments

Is it not supported to initialize a file more than once?

zj1838277795 avatar Jul 12 '21 01:07 zj1838277795

Yes, it's not supported as file rolling will require extra synchronization in such case. You can do the following:

  • use different file names for different libraries
  • use a centralized file logger and push log messages from libraries to it (see Chained Loggers for more info)

SergiusTheBest avatar Jul 12 '21 09:07 SergiusTheBest