| 378 | }; |
| 379 | |
| 380 | void LogFromLocation(Location location, const std::string& message) { |
| 381 | switch (location) { |
| 382 | case Location::INFO_1: |
| 383 | LogInfo("%s\n", message); |
| 384 | return; |
| 385 | case Location::INFO_2: |
| 386 | LogInfo("%s\n", message); |
| 387 | return; |
| 388 | case Location::DEBUG_LOG: |
| 389 | LogDebug(BCLog::LogFlags::HTTP, "%s\n", message); |
| 390 | return; |
| 391 | case Location::INFO_NOLIMIT: |
| 392 | LogInfo(util::log::NO_RATE_LIMIT, "%s\n", message); |
| 393 | return; |
| 394 | } // no default case, so the compiler can warn about missing cases |
| 395 | assert(false); |
| 396 | } |
| 397 | |
| 398 | /** |
| 399 | * For a given `location` and `message`, ensure that the on-disk debug log behaviour resembles what |
no outgoing calls
no test coverage detected