C++ logging library. It is extremely powerful, 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
When I use like printf function to write log with high frequency, it will cause crash in easyloggingpp #851
When I use like printf function to write log with high frequency, it will cause crash in easyloggingpp, but log a few times, this no problem, my code as follows:
When I use like printf function to write log with high frequency, it will cause crash in easyloggingpp, but log a few times, this no problem, my code as follows:
logger_->info("%v", mstrLocalStream.c_str());
Straceback: Fatal Error: Crash Signal: 11 core.so(_ZN9Exception10StackTraceEi+0x113) [0x7f4ea962f31b] core.so(_ZN9Exception12CrashHandlerEi+0x19) [0x7f4ea962f4c2] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f4ea9007520] /lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSo6sentryC1ERSo+0x10) [0x7f4ea9349f80] /lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt16ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l+0x3c) [0x7f4ea934aa0c] /lib/x86_64-linux-gnu/libstdc++.so.6(_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x2b) [0x7f4ea934aebb] ./plugin/core/log.so(_ZN2el4base14MessageBuilderlsEPKc+0x36) [0x7f4ea8033162] ./plugin/core/log.so(_ZN2el6Logger4log_IPKcJEEEvNS_5LevelEiS3_RKTDpRKT0+0xaa) [0x7f4ea8061210] ./plugin/core/log.so(_ZN2el6Logger3logIPKcJEEEvNS_5LevelES3_RKTDpRKT0+0x49) [0x7f4ea8060b7f] ./plugin/core/log.so(_ZN2el6Logger4infoIPKcJEEEvS3_RKTDpRKT0+0x31) [0x7f4ea805fde7] ./plugin/core/log.so(_ZN9LogModule3LogEN10ILogModule16SQUICK_LOG_LEVELEPKcz+0x3ce) [0x7f4ea805b866] ./plugin/core/log.so(_ZN9LogModule7LogInfoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci+0xa9) [0x7f4ea805bda9] ./plugin/core/lua.so(_ZN15LuaScriptModule7LogInfoERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x73) [0x7f4ea799c4e5] ./plugin/core/lua.so(_ZN7LuaIntf22CppDispatchClassMethodI15LuaScriptModuleLb0EMS1_FvRKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvSt5tupleIJNS_12CppArgHolderIS7_EEEELm0EJLm0EEE4callEPS1_RKSBRSF+0x88) [0x7f4ea79eb209] ./plugin/core/lua.so(_ZN7LuaIntf20CppInvokeClassMethodI15LuaScriptModuleLb0EMS1_FvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvJNS_12CppArgHolderIS7_EEEE4callEPS1_RKSB_RSt5tupleIJSD_EE+0x2f) [0x7f4ea79e103c] ./plugin/core/lua.so(_ZN7LuaIntf20CppInvokeClassMethodI15LuaScriptModuleLb0EMS1_FvRKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvJNS_12CppArgHolderIS7_EEEE4pushEP9lua_StatePS1_RKSB_RSt5tupleIJSD_EE+0x33) [0x7f4ea79d832c] ./squick.sh: line 16: 216160 Segmentation fault (core dumped) ./squick $@