From 9a9d5da11fa6033f82dcf8e2298aee29587f5396 Mon Sep 17 00:00:00 2001 From: Ryan Ofsky Date: Mon, 27 Feb 2023 14:21:13 -0500 Subject: refactor: Stop using gArgs global in system.cpp Most of the code in util/system.cpp that was hardcoded to use the global ArgsManager instance `gArgs` has been changed to work with explicit ArgsManager instances (for example in https://github.com/bitcoin/bitcoin/pull/20092). But a few hardcoded references to `gArgs` remain. This commit removes the last ones so these functions aren't reading or writing global state. --- src/init/common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/init') diff --git a/src/init/common.cpp b/src/init/common.cpp index f6f97f3914..791424f5f6 100644 --- a/src/init/common.cpp +++ b/src/init/common.cpp @@ -45,7 +45,7 @@ void AddLoggingArgs(ArgsManager& argsman) void SetLoggingOptions(const ArgsManager& args) { LogInstance().m_print_to_file = !args.IsArgNegated("-debuglogfile"); - LogInstance().m_file_path = AbsPathForConfigVal(args.GetPathArg("-debuglogfile", DEFAULT_DEBUGLOGFILE)); + LogInstance().m_file_path = AbsPathForConfigVal(args, args.GetPathArg("-debuglogfile", DEFAULT_DEBUGLOGFILE)); LogInstance().m_print_to_console = args.GetBoolArg("-printtoconsole", !args.GetBoolArg("-daemon", false)); LogInstance().m_log_timestamps = args.GetBoolArg("-logtimestamps", DEFAULT_LOGTIMESTAMPS); LogInstance().m_log_time_micros = args.GetBoolArg("-logtimemicros", DEFAULT_LOGTIMEMICROS); -- cgit v1.2.3