]> git.ozlabs.org Git - ccan/commit
pr_log: a new module that provides a simple run-time controlled logging interface
authorCody P Schafer <dev@codyps.com>
Wed, 19 Aug 2015 02:29:54 +0000 (22:29 -0400)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 20 Aug 2015 01:34:11 +0000 (11:04 +0930)
commit1f7028e9d7b87a95613c9db6a64a2111d4899395
tree291f5adb7a736096037a95927b4babd4bbb051f6
parent6aaca17e07588997417a73fac19dcf0ff17ed81b
pr_log: a new module that provides a simple run-time controlled logging interface

A simple printf logging infra where levels are determined by the
value of the "DEBUG" environment variable.

This is loosely based on the interfaces & functionality of Linux's
printk() and pr_*() wrapper macros.

Note that the current implementation uses "<N>" prefixes (where N is a
syslog level in ascii), allowing other programs that parse log output
(like systemd's journald) to know what the priority level is.

Signed-off-by: Cody P Schafer <dev@codyps.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Makefile-ccan
ccan/pr_log/LICENSE [new symlink]
ccan/pr_log/_info [new file with mode: 0644]
ccan/pr_log/pr_log.c [new file with mode: 0644]
ccan/pr_log/pr_log.h [new file with mode: 0644]
ccan/pr_log/test/run-debug.c [new file with mode: 0644]
ccan/pr_log/test/run-disable.c [new file with mode: 0644]
ccan/pr_log/test/run.c [new file with mode: 0644]