]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
libcgroup: Send log message to a log file, to syslog or to both.
authorDhaval Giani <dhaval@linux.vnet.ibm.com>
Thu, 12 Feb 2009 16:01:07 +0000 (16:01 +0000)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Thu, 12 Feb 2009 16:01:07 +0000 (16:01 +0000)
commita97281cee1d0326868a016dc491bf210bcccfca4
tree2d89815e13d66373521b9c9e0fa57abe61ae0f20
parent589b9f8fd74995b75e63bd8113322f545898c80d
libcgroup: Send log message to a log file, to syslog or to both.

From: Jan Safranek <jsafrane@redhat.com>

Rework whole cgrulesengd logging to be able to send log messages to syslog.
Also introduce more log levels:

LOG_NOTICE is the default log level, it logs startup/shutdown/configuration
reload and errors.

LOG_INFO shows in addition content of configuration file (only
if logging to file is enabled) and changing cgroup of a PID.

LOG_DEBUG show all details as it was before the patch.

TODO: if something gets wrong with mounted hierarchies (e.g. root unmounts
them), the log gets full of "Cgroup change for PID: ... FAILED". Some
suppression should be implemented.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@319 4f4bb910-9a46-0410-90c8-c897d4f1cd53
cgrulesengd.c
cgrulesengd.h