Browse Source Download (without any required ccan dependencies)
pr_log
print things with varying levels of importance
Cody P Schafer <[email protected]>
pr_log is a "logger" styled similarly to Linux's printk() and pr_*() macros. The amount of debug output is controlled by the value of the `DEBUG` environment variable.
It provides work-alikes for Linux's pr_devel, pr_debug, pr_info, etc macros.
#include <ccan/pr_log/pr_log.h>
int main(int argc, char *argv[])
{
pr_debug("It's working\n");
pr_info("Really, it works\n");
pr_emerg("I'm serious %d\n", argc);
return 0;
}
LGPL (v2.1 or any later version)