Skip to content

Pressio/pressio-log

Repository files navigation

pressio-log

Logging functionality for Pressio repositories

This is a work in progress, and all subsequent information is subject to change.

Instructions for Use:

  1. Clone the repo
git clone https://github.com/Pressio/pressio-log.git
  1. Set logging level in CMake and build tests
cd pressio-log
mkdir build
cd build
cmake -D PRESSIO_LOG_LEVEL=DEBUG .. && make

All logging levels:

  • 0 - "None"
  • 1 - "Basic"
  • 2 - "Info"
  • 3 - "Debug"

You can pass either the number or the corresponding string as the argument.

  1. Include the library

Point to pressio-log/include to include the relevant files.

  1. Include the core file
#include <pressio-log/core.hpp>
  1. Use the library

All logging is handled via macros:

PRESSIOLOG_BASIC("message");
PRESSIOLOG_INFO("message");
PRESSIOLOG_DEBUG("message");
PRESSIOLOG_WARNING("message");
PRESSIOLOG_ERROR("message");

Errors will print regardless of the logging level. Warnings will print for any level above "none".

Testing

After you have built (see step 2), run:

cd pressio-log/build/tests/logging
ctest

About

Logging functionality for Pressio repositories

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published