MCPcopy Create free account
hub / github.com/ElementsProject/elements / SetLoggingOptions

Function SetLoggingOptions

src/init/common.cpp:82–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void SetLoggingOptions(const ArgsManager& args)
83{
84 LogInstance().m_print_to_file = !args.IsArgNegated("-debuglogfile");
85 LogInstance().m_file_path = AbsPathForConfigVal(fs::PathFromString(args.GetArg("-debuglogfile", DEFAULT_DEBUGLOGFILE)));
86 LogInstance().m_print_to_console = args.GetBoolArg("-printtoconsole", !args.GetBoolArg("-daemon", false));
87 LogInstance().m_log_timestamps = args.GetBoolArg("-logtimestamps", DEFAULT_LOGTIMESTAMPS);
88 LogInstance().m_log_time_micros = args.GetBoolArg("-logtimemicros", DEFAULT_LOGTIMEMICROS);
89#ifdef HAVE_THREAD_LOCAL
90 LogInstance().m_log_threadnames = args.GetBoolArg("-logthreadnames", DEFAULT_LOGTHREADNAMES);
91#endif
92 LogInstance().m_log_sourcelocations = args.GetBoolArg("-logsourcelocations", DEFAULT_LOGSOURCELOCATIONS);
93 LogInstance().m_ratelimit = args.GetBoolArg("-ratelimitlogging", DEFAULT_RATELIMITLOGGING);
94
95 fLogIPs = args.GetBoolArg("-logips", DEFAULT_LOGIPS);
96}
97
98void SetLoggingCategories(const ArgsManager& args)
99{

Callers 1

InitLoggingFunction · 0.85

Calls 5

AbsPathForConfigValFunction · 0.85
PathFromStringFunction · 0.85
IsArgNegatedMethod · 0.80
GetArgMethod · 0.80
GetBoolArgMethod · 0.80

Tested by

no test coverage detected