Logging
The logging
module offers an adaptation and implementation of the
PSR-3: Logger Interface. It offers a series of predefined logging functions,
that are able to print a pre-formatted message to the console.
Behind the scene, the output()
function is used.
How to include
include("rsp/logging")
Example
warning("Unable to find config.json")
The above shown example will print a message similar to this:
CMake Warning at cmake/rsp/output.cmake:144 (message):
warning: Unable to find config.json
Timestamp: 2025-02-04 15:31:52.120599
Call Stack (most recent call first):
cmake/rsp/logging.cmake:337 (output)
cmake/rsp/logging.cmake:383 (log)
cmake/rsp/logging.cmake:158 (forward_to_log)
CMakeLists.txt:10 (warning)