MCPcopy Create free account
hub / github.com/Martchus/syncthingtray / handleLoggingCallback

Function handleLoggingCallback

syncthing/interface.cpp:84–98  ·  view source on GitHub ↗

! * \brief Internal callback for logging. Calls the user-provided callback. */

Source from the content-addressed store, hash-verified

82 * \brief Internal callback for logging. Calls the user-provided callback.
83 */
84void handleLoggingCallback(int logLevelInt, const char *msg, size_t msgSize)
85{
86 // ignore callback when no callback registered
87 if (!loggingCallback) {
88 return;
89 }
90
91 // ignore invalid/unknown log level
92 const auto logLevel = static_cast<LogLevel>(logLevelInt);
93 if (logLevel < lowestLogLevel || logLevel > highestLogLevel) {
94 return;
95 }
96
97 loggingCallback(logLevel, msg, msgSize);
98}
99
100class RunningState {
101public:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected