From a9ca260e7672afcf449fd2dfd010f33063774707 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Tue, 30 Dec 2014 16:40:15 +0000 Subject: [PATCH] Add support for LOG_DECODED_MESSAGES option to log all messages (disables --quiet). --- debian/changelog | 6 ++++++ debian/config-template | 4 ++++ debian/dump1090-mutability.config | 4 +++- debian/dump1090-mutability.init | 4 +++- debian/dump1090-mutability.templates | 7 +++++++ 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 11e18a4..4b25bc2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dump1090-mutability (1.08.2302.14+1mu-6) UNRELEASED; urgency=medium + + * Add support for LOG_DECODED_MESSAGES option to log all messages (disables --quiet). + + -- Oliver Jowett Tue, 30 Dec 2014 16:38:50 +0000 + dump1090-mutability (1.08.2302.14+1mu-5) unstable; urgency=medium * Add Provides: fatsv-data-source diff --git a/debian/config-template b/debian/config-template index 615c6fa..a9d4b99 100644 --- a/debian/config-template +++ b/debian/config-template @@ -115,5 +115,9 @@ JSON_INTERVAL= # Accuracy of receiver location to write to json state, one of "exact" / "approximate" / "none" JSON_LOCATION_ACCURACY= +# Set to yes to log all decoded messages +# This can get large fast! +LOG_DECODED_MESSAGES= + # Additional options that are passed to the Daemon. EXTRA_ARGS= diff --git a/debian/dump1090-mutability.config b/debian/dump1090-mutability.config index 68bc998..824e1cc 100644 --- a/debian/dump1090-mutability.config +++ b/debian/dump1090-mutability.config @@ -48,6 +48,7 @@ if [ -e $CONFIGFILE ]; then db_set $NAME/json-dir "$JSON_DIR" db_set $NAME/json-interval "$JSON_INTERVAL" db_set $NAME/json-location-accuracy "$JSON_LOCATION_ACCURACY" + db_set_yn $NAME/log-decoded-messages "$LOG_DECODED_MESSAGES" db_set $NAME/extra-args "$EXTRA_ARGS" fi @@ -205,7 +206,8 @@ db_go || true; db_get $NAME/auto-start; if [ "$RET" = "true" ]; then db_input low $NAME/json-dir || true db_input low $NAME/json-location-accuracy || true fi - + + db_input low $NAME/log-decoded-messages || true db_input low $NAME/extra-args || true db_go || True diff --git a/debian/dump1090-mutability.init b/debian/dump1090-mutability.init index ed900eb..f28bbd4 100644 --- a/debian/dump1090-mutability.init +++ b/debian/dump1090-mutability.init @@ -18,7 +18,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="dump1090-mutability daemon" NAME=dump1090-mutability DAEMON=/usr/bin/$NAME -ARGS="--quiet" +ARGS="" PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME @@ -89,6 +89,8 @@ case "x$JSON_LOCATION_ACCURACY" in *) ARGS="$ARGS --json-location-accuracy 0" ;; esac +if [ "x$LOG_DECODED_MESSAGES" != "xyes" ]; then ARGS="$ARGS --quiet"; fi + if [ -n "$EXTRA_ARGS" ]; then ARGS="$ARGS $EXTRA_ARGS"; fi # Load the VERBOSE setting and other rcS variables diff --git a/debian/dump1090-mutability.templates b/debian/dump1090-mutability.templates index 68b6a70..b88ca11 100644 --- a/debian/dump1090-mutability.templates +++ b/debian/dump1090-mutability.templates @@ -255,6 +255,13 @@ Type: select Choices: approximate, exact, none Default: approximate +Template: dump1090-mutability/log-decoded-messages +Description: Log all decoded messages? + dump1090 can log all decoded messages as text to the logfile. + This can result in a very large logfile! Usually you don't need this. +Type: boolean +Default: false + Template: dump1090-mutability/extra-args Description: Extra arguments to pass to dump1090: Here you can add any extra arguments you want to pass to dump1090.