g3log icon indicating copy to clipboard operation
g3log copied to clipboard

[Question]What is the right way of using g3log in different class?

Open MichaelFinance opened this issue 2 years ago • 1 comments

I did not find any test case of using g3log in different threads, Could you write an example of using g3log in different classes which have different threads?

MichaelFinance avatar Sep 14 '22 12:09 MichaelFinance

As long as g3log is instantiated correctly then it should be threadsafe to use. While the documentation doesn't have code examples of this, that G3log is threadsafe is mentioned

Please see

  • https://kjellkod.github.io/g3log/
  • https://kjellkod.github.io/g3log/g3log/
  • in case custom formatting is needed where the different thread IDs are shown, https://kjellkod.github.io/g3log/API_custom_formatting/ and these tests that uses it: https://github.com/KjellKod/g3log/blob/master/test_unit/test_message.cpp

KjellKod avatar Sep 14 '22 13:09 KjellKod