Skip to content

Logging

fitchn edited this page Jul 6, 2020 · 1 revision

Currently, molecool uses spdlog as a submodule for thread-safe logging to the console. Usage is made trivial by the definition of logging macros. In molecool itself, the following lines of code are used to generate different levels of message:

MC_CORE_TRACE("a trace message");
MC_CORE_INFO("an info message");
MC_CORE_WARN("a warn message");
MC_CORE_ERROR("an error message");
MC_CORE_FATAL("a failure message before exiting the program");

A user application/simulation can make use of a similarly named set of macros, i.e.

MC_SIM_TRACE("a trace message");
MC_SIM_INFO("an info message");
MC_SIM_WARN("a warn message");
MC_SIM_ERROR("an error message");
MC_SIM_FATAL("a failure message before exiting the program");
Clone this wiki locally