Changeset View
Changeset View
Standalone View
Standalone View
src/logging.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Copyright (c) 2017-2019 The Bitcoin developers | // Copyright (c) 2017-2019 The Bitcoin developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include <logging.h> | #include <logging.h> | ||||
#include <util/threadnames.h> | #include <util/threadnames.h> | ||||
#include <util/time.h> | #include <util/time.h> | ||||
#include <mutex> | |||||
bool fLogIPs = DEFAULT_LOGIPS; | bool fLogIPs = DEFAULT_LOGIPS; | ||||
const char *const DEFAULT_DEBUGLOGFILE = "debug.log"; | const char *const DEFAULT_DEBUGLOGFILE = "debug.log"; | ||||
BCLog::Logger &LogInstance() { | BCLog::Logger &LogInstance() { | ||||
/** | /** | ||||
* NOTE: the logger instance is leaked on exit. This is ugly, but will be | * NOTE: the logger instance is leaked on exit. This is ugly, but will be | ||||
* cleaned up by the OS/libc. Defining a logger as a global object doesn't | * cleaned up by the OS/libc. Defining a logger as a global object doesn't | ||||
* work since the order of destruction of static/global objects is | * work since the order of destruction of static/global objects is | ||||
▲ Show 20 Lines • Show All 311 Lines • Show Last 20 Lines |