DEVELOPER GUIDE

Log and Debug Output

Introduction

For application output we use spdlog which is already integrated in OGS. Spdlog provides several verbosity levels which can be used with simple calls:

ERR("An error message!");
WARN("A warning message.");
INFO("An information message...");
DBUG("A debug message.");

As arguments you can use the same functionality as in {fmt} —a modern formatting library:

int foo = 42;
double boo = 3.14;
WARN("Foo is {}! Current value is {:10.2g}.", foo, boo);

For more information see the spdlog wiki .

On release builds the default log level is INFO, for debug builds it is DEBUG. The log level can be adjusted on the command line with -l <LOG_LEVEL> flag.


This article was written by Lars Bilke. If you are missing something or you find an error please reach out to us on our forum.
Generated with Hugo 0.164.0 in CI job 825193 | Last revision: April 20, 2026
Commit: refactor(MeshLib): remove PropertyVector::push_back 870422dde  | Edit this page on