24 #include <unordered_map> 34 class LogHandlerFactory;
115 void resetConfig(
const LogConfig& config);
122 void cleanupHandlers();
130 size_t flushAllHandlers();
147 void registerHandlerFactory(
148 std::unique_ptr<LogHandlerFactory> factory,
149 bool replaceExisting =
false);
169 std::atomic<LogLevel>* xlogCategoryLevel,
174 std::atomic<bool>* isInitialized);
200 template <
typename...
Args>
206 file, lineNumber, folly::to<std::string>(std::forward<Args>(args)...));
229 std::unique_ptr<LogCategory>,
234 std::unordered_map<std::string, std::unique_ptr<LogHandlerFactory>>;
235 using HandlerMap = std::unordered_map<std::string, std::weak_ptr<LogHandler>>;
248 folly::StringPiece name);
251 folly::StringPiece name,
255 std::unordered_map<std::string, std::shared_ptr<LogHandler>>;
257 unordered_map<std::shared_ptr<LogHandler>, std::shared_ptr<LogHandler>>;
258 LogConfig getConfigImpl(
bool includeAllCategories)
const;
259 void startConfigUpdate(
264 void finishConfigUpdate(
268 std::vector<std::shared_ptr<LogHandler>> buildCategoryHandlerList(
271 const std::vector<std::string>& categoryHandlerNames);
273 static void internalWarningImpl(
274 folly::StringPiece filename,
277 static
void defaultInternalWarningImpl(
280 std::
string&& msg) noexcept;
FOLLY_ATTR_WEAK void initializeLoggerDB(LoggerDB &db)
std::unordered_map< std::shared_ptr< LogHandler >, std::shared_ptr< LogHandler >> OldToNewHandlerMap
std::unordered_map< std::string, std::unique_ptr< LogHandlerFactory >> HandlerFactoryMap
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
—— Concurrent Priority Queue Implementation ——
requires E e noexcept(noexcept(s.error(std::move(e))))
void handler(int, siginfo_t *, void *)
typename Base::LockedPtr LockedPtr
std::unordered_map< std::string, std::weak_ptr< LogHandler >> HandlerMap
HandlerFactoryMap factories
void(*)(folly::StringPiece file, int lineNumber, std::string &&) InternalWarningHandler
Range< const char * > StringPiece
folly::Function< void()> parent
std::unordered_map< folly::StringPiece, std::unique_ptr< LogCategory >, LogName::Hash, LogName::Equals > LoggerNameMap
std::unordered_map< std::string, std::shared_ptr< LogHandler >> NewHandlerMap
static void internalWarning(folly::StringPiece file, int lineNumber, Args &&...args) noexcept