Inside Bitcoin
Opening the selected file…
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
251bool SetLogLevel(std::string_view level);253CategoryMask GetCategoryMask() const { return m_categories.load(); }255void EnableCategory(LogFlags flag);256bool EnableCategory(std::string_view str);257void DisableCategory(LogFlags flag);258bool DisableCategory(std::string_view str);260bool WillLogCategory(LogFlags category) const;261bool WillLogCategoryLevel(LogFlags category, Level level) const EXCLUSIVE_LOCKS_REQUIRED(!m_cs);263/** Returns a vector of the log categories in alphabetical order. */264std::vector<LogCategory> LogCategoriesList() const;265/** Returns a string with the log categories in alphabetical order. */266std::string LogCategoriesString() const267{268return util::Join(LogCategoriesList(), ", ", [&](const LogCategory& i) { return i.category; });269};271//! Returns a string with all user-selectable log levels.272std::string LogLevelsString() const;274//! Returns the string representation of a log level.275static std::string LogLevelToStr(BCLog::Level level);277bool DefaultShrinkDebugFile() const;279//! Return log flag if str parses as a log category.280static std::optional<BCLog::LogFlags> GetLogCategory(std::string_view str);281};282} // namespace BCLog284BCLog::Logger& LogInstance();286#endif // BITCOIN_LOGGING_H
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.