bitcoin/src/init/common.h
klementtan eb7bee5f84 Create -loglevel configuration option
- add a -loglevel=<level>|<category:level> config option to allow users
  to set a global -loglevel and category-specific log levels. LogPrintLevel
  messages with a higher severity level than -loglevel will not be printed
  in the debug log.

- for now, this config option is debug-only during the migration to
  severity-based logging

- update unit and functional tests

Co-authored-by: "Jon Atack <jon@atack.com>"
2022-08-20 11:53:37 +02:00

22 lines
688 B
C++

// Copyright (c) 2021 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
//! @file
//! @brief Common init functions shared by bitcoin-node, bitcoin-wallet, etc.
#ifndef BITCOIN_INIT_COMMON_H
#define BITCOIN_INIT_COMMON_H
class ArgsManager;
namespace init {
void AddLoggingArgs(ArgsManager& args);
void SetLoggingOptions(const ArgsManager& args);
void SetLoggingCategories(const ArgsManager& args);
void SetLoggingLevel(const ArgsManager& args);
bool StartLogging(const ArgsManager& args);
void LogPackageVersion();
} // namespace init
#endif // BITCOIN_INIT_COMMON_H