Browse Source

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
commit
e84c2f52c3
3 changed files with 12 additions and 10 deletions
  1. +10
    -10
      daemon/main.c
  2. +1
    -0
      debian/ngcp-mediaproxy-ng-daemon.default
  3. +1
    -0
      debian/ngcp-mediaproxy-ng-daemon.init

+ 10
- 10
daemon/main.c View File

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


+ 1
- 0
debian/ngcp-mediaproxy-ng-daemon.default View File

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

+ 1
- 0
debian/ngcp-mediaproxy-ng-daemon.init View File

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


Loading…
Cancel
Save