nodewatcher: Add prefix to debug messages

Because nodewatcher is executed using a cron, but
our cron has no way to report the origin of a specific
log entry, a 'nodewatcher:' prefix is added to all debug
output.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Fabian Bläse 2020-04-22 16:05:26 +02:00
parent 2eb675790e
commit 25c5edcf3c
5 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@
# License; GPL v3
debug() {
(>&2 echo "$1")
(>&2 echo "nodewatcher: $1")
}
debug "Collecting information from batman advanced and its interfaces"

View File

@ -6,7 +6,7 @@ IFACEBLACKLIST=$(uci get nodewatcher.@network[0].iface_blacklist)
IPWHITELIST=$(uci get nodewatcher.@network[0].ip_whitelist)
debug() {
(>&2 echo "$1")
(>&2 echo "nodewatcher: $1")
}
inArray() {

View File

@ -5,7 +5,7 @@
MESH_INTERFACE=$(uci get nodewatcher.@network[0].mesh_interface)
debug() {
(>&2 echo "$1")
(>&2 echo "nodewatcher: $1")
}
debug "Collecting information about connected clients"

View File

@ -6,7 +6,7 @@ SCRIPT_STATUS_FILE=$(uci get nodewatcher.@script[0].status_text_file)
SCRIPT_VERSION=$(cat /etc/nodewatcher_version)
debug() {
(>&2 echo "$1")
(>&2 echo "nodewatcher: $1")
}
debug "Collecting basic system status data"

View File

@ -17,7 +17,7 @@ trap "lock -u \"$lockfile\"" INT TERM EXIT
SCRIPT_DATA_FILE=$(uci get nodewatcher.@script[0].data_file)
debug() {
(>&2 echo "$1")
(>&2 echo "nodewatcher: $1")
}
#This method generates the crawl data XML file that is being fetched by netmon