]> code.ossystems Code Review - openembedded-core.git/commitdiff
busybox: enable log level configuration in syslog-startup.conf and script
authorJoshua Lock <josh@linux.intel.com>
Wed, 11 Jan 2012 19:02:46 +0000 (11:02 -0800)
committerSaul Wold <sgw@linux.intel.com>
Thu, 19 Jan 2012 09:16:28 +0000 (01:16 -0800)
It's possible to configure busybox syslog to only log messages above a
certain level, expose this functionality through the syslog-startup.conf
and syslog init script.

Valid values are 1-8 inclusive.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
meta/recipes-core/busybox/files/syslog
meta/recipes-core/busybox/files/syslog-startup.conf

index 0be412bbebed5bcb8c57d75c19db6102e50949b0..deeea8ba650b83210ed940e7252240a97bcfe588 100644 (file)
@@ -40,6 +40,9 @@ if [ -f /etc/syslog-startup.conf ]; then
        if [ "$REDUCE" = "yes" ]; then
                SYSLOG_ARGS="$SYSLOG_ARGS -S"
        fi
+       if [ -n "$LOGLEVEL" ]; then
+           SYSLOG_ARGS="$SYSLOG_ARGS -l $LOGLEVEL"
+       fi
 else
        # default: log to 16K shm circular buffer
        SYSLOG_ARGS="-C"
index f58cbe575ede140ef8c168596a6f6e274f729898..83b86f22936b5355c3788e68743a397c4e160474 100644 (file)
@@ -9,3 +9,4 @@ REDUCE=no                       # reduce-size logging
 #ROTATEGENS=3                  # keep X generations of rotated logs
 BUFFERSIZE=64                  # size of circular buffer [kByte]
 FOREGROUND=no                  # run in foreground (don't use!)
+#LOGLEVEL=5                    # local log level (between 1 and 8)