From 8e7b961388920144993d0bd56d93f89e5c60fbff Mon Sep 17 00:00:00 2001 From: Jim Posen Date: Fri, 20 Apr 2018 00:42:32 -0700 Subject: 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- --- src/init.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index c0eb746d7..7bc2f6302 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -305,7 +305,7 @@ static void HandleSIGTERM(int) static void HandleSIGHUP(int) { - g_logger->fReopenDebugLog = true; + g_logger->m_reopen_file = true; } #ifndef WIN32 @@ -831,10 +831,10 @@ void InitLogging() // debug.log. LogPrintf("\n\n\n\n\n"); - g_logger->fPrintToConsole = gArgs.GetBoolArg("-printtoconsole", !gArgs.GetBoolArg("-daemon", false)); - g_logger->fPrintToDebugLog = !gArgs.IsArgNegated("-debuglogfile"); - g_logger->fLogTimestamps = gArgs.GetBoolArg("-logtimestamps", DEFAULT_LOGTIMESTAMPS); - g_logger->fLogTimeMicros = gArgs.GetBoolArg("-logtimemicros", DEFAULT_LOGTIMEMICROS); + g_logger->m_print_to_console = gArgs.GetBoolArg("-printtoconsole", !gArgs.GetBoolArg("-daemon", false)); + g_logger->m_print_to_file = !gArgs.IsArgNegated("-debuglogfile"); + g_logger->m_log_timestamps = gArgs.GetBoolArg("-logtimestamps", DEFAULT_LOGTIMESTAMPS); + g_logger->m_log_time_micros = gArgs.GetBoolArg("-logtimemicros", DEFAULT_LOGTIMEMICROS); fLogIPs = gArgs.GetBoolArg("-logips", DEFAULT_LOGIPS); @@ -1225,7 +1225,7 @@ bool AppInitMain() #ifndef WIN32 CreatePidFile(GetPidFile(), getpid()); #endif - if (g_logger->fPrintToDebugLog) { + if (g_logger->m_print_to_file) { if (gArgs.GetBoolArg("-shrinkdebugfile", g_logger->DefaultShrinkDebugFile())) { // Do this first since it both loads a bunch of debug.log into memory, // and because this needs to happen before any other debug.log printing @@ -1237,7 +1237,7 @@ bool AppInitMain() } } - if (!g_logger->fLogTimestamps) + if (!g_logger->m_log_timestamps) LogPrintf("Startup time: %s\n", FormatISO8601DateTime(GetTime())); LogPrintf("Default data directory %s\n", GetDefaultDataDir().string()); LogPrintf("Using data directory %s\n", GetDataDir().string()); -- cgit v1.2.3