abumq / easyloggingpp

C++ logging library. It is powerful, supports asynchronous low latency, extendable, light-weight, fast performing, thread and type safe and consists of many built-in features. It provides ability to write logs in your own customized format. It also provide support for logging your classes, third-party libraries, STL and third-party containers etc.
MIT License
3.75k stars 918 forks source link

multi thread error #791

Open hhxdestiny opened 3 years ago

hhxdestiny commented 3 years ago

bug

hhxdestiny commented 3 years ago

mutlit thread two hours, such as:

2021-06-24 02:51:16,031 INFO a.cpp:10 test a
2021-06-24 02:51:16,612 INFO b.cpp:10 test b
2021-06-24 02:51:16,873 INFO a.cpp:10 test a
2021-06-24 02:51:17,053 INFO b.cpp:10 test btest a
2mhk commented 2 years ago

same problem with the message conglutination

here is the logConfig

2mhk commented 2 years ago

update :add “#define ELPP_THREAD_SAFE” in easylogging++.h will fix it