C+
Packages · View as Markdown

log

Leveled logging to stderr: timestamp, fixed-width level tag, optional ANSI color.

[dependencies]
log = "*"
import "log/log" as log;

log::set_max_level(log::Level::Info);   // default is already Info
log::info("server listening");
log::warn("retrying connection");
log::error("bind failed");

Docs

Tests

Unit tests live in src/log.cplus.

cd vendor/log && cpc test