]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
Reworked logging configuration
authorPeter Schiffer <pschiffe@redhat.com>
Tue, 2 Apr 2013 08:54:58 +0000 (10:54 +0200)
committerIvana Hutarova Varekova <varekova@redhat.com>
Tue, 2 Apr 2013 08:54:58 +0000 (10:54 +0200)
Debug log messages are now automatically compiled in libcgroup unless
explicitly disabled with ./configure --disable-debug.

Please note that the messages still must be enabled in runtime by setting
appropriate log level, e.g. export CGROUP_LOGLEVEL=DEBUG.

Changelog:
  - removed --disable-debug option of configure script, removing debug
    messages we would save 'amazing' 4kB, which is IMO not worth it.

Signed-off-by: Peter Schiffer <pschiffe@redhat.com>
Acked-by: Ivana Hutarova Varekova <varekova@redhat.com>
configure.in
src/libcgroup-internal.h

index 29be7a47fca1df0f7074f0713e004bd91b3e8384..8284c1b6d2ea06e7287b0ac248c9cdbaa62c799b 100644 (file)
@@ -45,17 +45,6 @@ AC_ARG_ENABLE([bindings],
 AM_CONDITIONAL([WITH_BINDINGS], [test x$with_bindings = xtrue])
 
 # Process command line options
-AC_ARG_ENABLE([debug],
-       [AC_HELP_STRING([--enable-debug],
-               [enable extra debugging output [default=no]])],
-       [
-               if test "x$enableval" = xyes; then
-                       AC_DEFINE([CGROUP_DEBUG], [],
-                               [Define to enable extra debugging output.])
-               fi
-       ]
-       [])
-
 AC_ARG_ENABLE([tools],
        [AC_HELP_STRING([--enable-tools],
                [compile libcgroup tools [default=yes]])],
index 47ee2abe3839b84957b1e8138bdd7e819f202491..4c0f46c6c6e27c8c0a7cd66237519609202234ae 100644 (file)
@@ -64,12 +64,7 @@ __BEGIN_DECLS
 #define cgroup_err(x...) cgroup_log(CGROUP_LOG_ERROR, x)
 #define cgroup_warn(x...) cgroup_log(CGROUP_LOG_WARNING, x)
 #define cgroup_info(x...) cgroup_log(CGROUP_LOG_INFO, x)
-
-#ifdef CGROUP_DEBUG
 #define cgroup_dbg(x...) cgroup_log(CGROUP_LOG_DEBUG, x)
-#else
-#define cgroup_dbg(x...) do {} while (0)
-#endif
 
 #define CGROUP_DEFAULT_LOGLEVEL CGROUP_LOG_ERROR