Skip to content

Repository files navigation

tsnl/log

A single-header C++20 logging library. See include/tsnl/log.hpp.

#include<tsnl/log.hpp>automain() -> int {
tsnl::log::set_min_level(tsnl::log::level::debug); // default min level is 'info'tsnl::log::debug() << "This is a debug message.";
tsnl::log::info() << "This is an info message.";
tsnl::log::warning() << "This is a warning message.";
tsnl::log::error() << "This is an error message.";
return0;
}

Getting Started

Bazel

# in MODULE.bazelbazel_dep(name="tsnl.log")
git_override(
module_name="tsnl.log",
remote="https://github.com/tsnl/log",
branch="main",
# commit = "..."	# -> you can set a fixed commit if you'd like.
)
# in BUILD.bazelcc_library(
name="my_awesome_cpp_library",
deps= [
# ..."@tsnl.log"
]
)

Other build systems

You can copy the contents of /include into your project. You only need to ensure that include/ is in the include path.

About

Single-header C++20 logging + error reporting library.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages