logging: fix a crash when using logging after main() returns
Summary: Fix a problem where `LoggerDB::get()` could crash when called after `main()` has returned. The `LoggerDBSingleton` object may have been destroyed already, so calling `LoggerDBSingleton::getDB()` was not allowed. This updates the code to just store the singleton in a simple raw pointer, and only use the singleton helper object for flushing log handlers. Reviewed By: dmaone Differential Revision: D13984692 fbshipit-source-id: a0c8550af367458ca39fefa9090e3165ad6a82bb
Showing
Please register or sign in to comment