If CGROUP_LOGLEVEL=DEBUG environment variable is set, enable --debug verbosity level in the cgrulesengd daemon.
Signed-off-by: Peter Schiffer <pschi...@redhat.com> --- src/daemon/cgrulesengd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/daemon/cgrulesengd.c b/src/daemon/cgrulesengd.c index 72ff9a9..bc327d0 100644 --- a/src/daemon/cgrulesengd.c +++ b/src/daemon/cgrulesengd.c @@ -1027,6 +1027,18 @@ int main(int argc, char *argv[]) goto finished; } + /* + * Check environment variable CGROUP_LOGLEVEL. If it's set to DEBUG, + * set appropriate verbosity level. + */ + char *level_str = getenv("CGROUP_LOGLEVEL"); + if (level_str != NULL) { + if (cgroup_parse_log_level_str(level_str) == CGROUP_LOG_DEBUG) { + verbosity = 4; + logp = "-"; + } + } + while (1) { int c; ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel