]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
Reworked libcgroup logging
authorPeter Schiffer <pschiffe@redhat.com>
Tue, 2 Apr 2013 08:52:59 +0000 (10:52 +0200)
committerIvana Hutarova Varekova <varekova@redhat.com>
Tue, 2 Apr 2013 08:52:59 +0000 (10:52 +0200)
commitcbbf888183a68ddbdc7c5891baeb732adbb1ed2d
tree1c52c4cc40bb5e66237a3700038d7eb88ab63efb
parent438ccebfb109efe7cbe9e503dfd163bf2e8d8185
Reworked libcgroup logging

Whole new logging with following goals is here:
 - more log levels.
 - allow applications to log somewhere else than stdout using their custom
   callback.
 - provide simple stdout logger for 'lazy' applications.

The logging is off by default, i.e. no message appears on stdout unless
application initializes the logging explicitly. But see following patches!

Internally, nothing changes, cgroup_dbg is still working. In addition,
cgroup_err, cgroup_warn and cgroup_info appeared. Description what message
should use which log level is in doxygen info, together with new public API
incl. simple example, I won't copy it here

Also the cgroup_log function is made public. I am not sure if it is the
right thing to do, but that's currently the simplest way how to use the
logging from our tools (which link only the public libcgroup API).

Changelog:
  - fixed typo in cgroup_log doxygen comment

Signed-off-by: Peter Schiffer <pschiffe@redhat.com>
Acked-by: Ivana Hutarova Varekova <varekova@redhat.com>
include/Makefile.am
include/libcgroup.h
include/libcgroup/log.h [new file with mode: 0644]
src/Makefile.am
src/libcgroup-internal.h
src/libcgroup.map
src/log.c [new file with mode: 0644]