Add support for LOG_DECODED_MESSAGES option to log all messages (disables --quiet).

This commit is contained in:
Oliver Jowett 2014-12-30 16:40:15 +00:00
parent 6e3238d303
commit a9ca260e76
5 changed files with 23 additions and 2 deletions

6
debian/changelog vendored
View file

@ -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 <oliver@mutability.co.uk> Tue, 30 Dec 2014 16:38:50 +0000
dump1090-mutability (1.08.2302.14+1mu-5) unstable; urgency=medium
* Add Provides: fatsv-data-source

View file

@ -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=

View file

@ -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

View file

@ -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

View file

@ -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.