added log level handling to debian default file and init script

- fixed indentation in main.c
git.mgm/mediaproxy-ng/origin/mr3.2
Juha Heinanen 12 years ago
parent d74c24ff21
commit e84c2f52c3

@ -114,18 +114,18 @@ static void sighandler(gpointer x) {
if (ret == SIGINT || ret == SIGTERM) if (ret == SIGINT || ret == SIGTERM)
global_shutdown = 1; global_shutdown = 1;
else if (ret == SIGUSR1) { else if (ret == SIGUSR1) {
if (log_level > 0) { if (log_level > 0) {
log_level--; log_level--;
setlogmask(LOG_UPTO(log_level)); setlogmask(LOG_UPTO(log_level));
mylog(log_level, "Set log level to %d\n", log_level); mylog(log_level, "Set log level to %d\n", log_level);
} }
} }
else if (ret == SIGUSR2) { else if (ret == SIGUSR2) {
if (log_level < 7) { if (log_level < 7) {
log_level++; log_level++;
setlogmask(LOG_UPTO(log_level)); setlogmask(LOG_UPTO(log_level));
mylog(log_level, "Set log level to %d\n", log_level); mylog(log_level, "Set log level to %d\n", log_level);
} }
} }
else else
abort(); abort();

@ -18,3 +18,4 @@ TABLE=0
# REDIS=127.0.0.1:6379 # REDIS=127.0.0.1:6379
# REDIS_DB=1 # REDIS_DB=1
# B2B_URL=http://127.0.0.1:8090/ # B2B_URL=http://127.0.0.1:8090/
# LOG_LEVEL=6

@ -61,6 +61,7 @@ OPTIONS=""
[ -z "$B2B_URL" ] || OPTIONS="$OPTIONS --b2b-url=$B2B_URL" [ -z "$B2B_URL" ] || OPTIONS="$OPTIONS --b2b-url=$B2B_URL"
[ -z "$NO_FALLBACK" -o \( "$NO_FALLBACK" != "1" -a "$NO_FALLBACK" != "yes" \) ] || OPTIONS="$OPTIONS --no-fallback" [ -z "$NO_FALLBACK" -o \( "$NO_FALLBACK" != "1" -a "$NO_FALLBACK" != "yes" \) ] || OPTIONS="$OPTIONS --no-fallback"
OPTIONS="$OPTIONS --table=$TABLE" OPTIONS="$OPTIONS --table=$TABLE"
[ -z "$LOG_LEVEL" ] || OPTIONS="$OPTIONS --log-level=$LOG_LEVEL"
if test "$FORK" = "no" ; then if test "$FORK" = "no" ; then
OPTIONS="$OPTIONS --foreground" OPTIONS="$OPTIONS --foreground"
fi fi

Loading…
Cancel
Save