! * \brief Internal callback for logging. Calls the user-provided callback. */
| 82 | * \brief Internal callback for logging. Calls the user-provided callback. |
| 83 | */ |
| 84 | void 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 | |
| 100 | class RunningState { |
| 101 | public: |
nothing calls this directly
no outgoing calls
no test coverage detected