diff options
author | Jim Posen <jimpo@coinbase.com> | 2018-04-20 00:42:32 -0700 |
---|---|---|
committer | Jim Posen <jimpo@coinbase.com> | 2018-04-29 14:37:17 -0700 |
commit | 8e7b961388920144993d0bd56d93f89e5c60fbff (patch) | |
tree | b23c62b3531a718bb72b722500a95f30d4ec68b9 /src/logging.h | |
parent | 1eac317f25b905e97e311130ab19c3b0d257fc04 (diff) |
scripted-diff: Rename BCLog::Logger member variables.
-BEGIN VERIFY SCRIPT-
sed -i "s/fileout/m_fileout/" src/logging.h src/logging.cpp
sed -i "s/mutexDebugLog/m_file_mutex/" src/logging.h src/logging.cpp
sed -i "s/vMsgsBeforeOpenLog/m_msgs_before_open/" src/logging.h src/logging.cpp
sed -i "s/logCategories/m_categories/" src/logging.h src/logging.cpp
sed -i "s/fPrintToConsole/m_print_to_console/" src/logging.h src/logging.cpp src/init.cpp
sed -i "s/fPrintToDebugLog/m_print_to_file/" src/logging.h src/logging.cpp src/init.cpp src/test/test_bitcoin.cpp src/bench/bench_bitcoin.cpp
sed -i "s/fLogTimestamps/m_log_timestamps/" src/logging.h src/logging.cpp src/init.cpp
sed -i "s/fLogTimeMicros/m_log_time_micros/" src/logging.h src/logging.cpp src/init.cpp
sed -i "s/fReopenDebugLog/m_reopen_file/" src/logging.h src/logging.cpp src/init.cpp
sed -i "s/fStartedNewLine/m_started_new_line/" src/logging.h src/logging.cpp
-END VERIFY SCRIPT-
Diffstat (limited to 'src/logging.h')
-rw-r--r-- | src/logging.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/logging.h b/src/logging.h index b88c9d9919..249d5debef 100644 --- a/src/logging.h +++ b/src/logging.h @@ -59,42 +59,42 @@ namespace BCLog { class Logger { private: - FILE* fileout = nullptr; - std::mutex mutexDebugLog; - std::list<std::string> vMsgsBeforeOpenLog; + FILE* m_fileout = nullptr; + std::mutex m_file_mutex; + std::list<std::string> m_msgs_before_open; /** - * fStartedNewLine is a state variable that will suppress printing of + * m_started_new_line is a state variable that will suppress printing of * the timestamp when multiple calls are made that don't end in a * newline. */ - std::atomic_bool fStartedNewLine{true}; + std::atomic_bool m_started_new_line{true}; /** Log categories bitfield. */ - std::atomic<uint32_t> logCategories{0}; + std::atomic<uint32_t> m_categories{0}; std::string LogTimestampStr(const std::string& str); public: - bool fPrintToConsole = false; - bool fPrintToDebugLog = true; + bool m_print_to_console = false; + bool m_print_to_file = true; - bool fLogTimestamps = DEFAULT_LOGTIMESTAMPS; - bool fLogTimeMicros = DEFAULT_LOGTIMEMICROS; + bool m_log_timestamps = DEFAULT_LOGTIMESTAMPS; + bool m_log_time_micros = DEFAULT_LOGTIMEMICROS; - std::atomic<bool> fReopenDebugLog{false}; + std::atomic<bool> m_reopen_file{false}; /** Send a string to the log output */ int LogPrintStr(const std::string &str); /** Returns whether logs will be written to any output */ - bool Enabled() const { return fPrintToConsole || fPrintToDebugLog; } + bool Enabled() const { return m_print_to_console || m_print_to_file; } fs::path GetDebugLogPath() const; bool OpenDebugLog(); void ShrinkDebugFile(); - uint32_t GetCategoryMask() const { return logCategories.load(); } + uint32_t GetCategoryMask() const { return m_categories.load(); } void EnableCategory(LogFlags flag); bool EnableCategory(const std::string& str); |