Browse Source Download (without any required ccan dependencies)

Module:

pr_log

Summary:

print things with varying levels of importance

Author:

Cody P Schafer <dev@codyps.com>

Dependencies:

Description:

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.

Example:

#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;
}

License:

LGPL (v2.1 or any later version)