mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
logging: update LoggerDB::get() to return a reference
Summary: Change `LoggerDB::get()` to a reference instead of a pointer since this function can never return null. Reviewed By: yfeldblum Differential Revision: D6893206 fbshipit-source-id: af47063918a79c851fd39b838d6c63755166e033
This commit is contained in:
parent
b5c47a9ed7
commit
4fb0ac3809
@ -61,7 +61,7 @@ void PrivHelperServer::initLogging() {
|
||||
// Initialize the folly logging code for use inside the privhelper process.
|
||||
// For simplicity and safety we always use a fixed logging configuration here
|
||||
// rather than parsing a more complex full logging configuration string.
|
||||
auto* rootCategory = folly::LoggerDB::get()->getCategory(".");
|
||||
auto* rootCategory = folly::LoggerDB::get().getCategory(".");
|
||||
|
||||
// We always use a non-async file writer, rather than the threaded async
|
||||
// writer.
|
||||
|
@ -575,8 +575,8 @@ void EdenServiceHandler::debugSetLogLevel(
|
||||
inherit = false;
|
||||
}
|
||||
|
||||
auto db = folly::LoggerDB::get();
|
||||
result.categoryCreated = !db->getCategoryOrNull(*category);
|
||||
auto& db = folly::LoggerDB::get();
|
||||
result.categoryCreated = !db.getCategoryOrNull(*category);
|
||||
folly::Logger(*category).getCategory()->setLevel(
|
||||
folly::stringToLogLevel(*level), inherit);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user