mirror of
https://github.com/craigerl/aprsd.git
synced 2024-11-16 13:21:56 -05:00
Merge pull request #73 from emresaglam/loglevel
Added LOG_LEVEL env variable for the docker
This commit is contained in:
commit
950c62f49b
@ -13,6 +13,12 @@ if [ ! -z "${APRSD_PLUGINS}" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "${LOG_LEVEL}" ] || [[ ! "${LOG_LEVEL}" =~ ^(CRITICAL|ERROR|WARNING|INFO)$ ]]; then
|
||||||
|
LOG_LEVEL="DEBUG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Log level is set to ${LOG_LEVEL}";
|
||||||
|
|
||||||
# check to see if there is a config file
|
# check to see if there is a config file
|
||||||
APRSD_CONFIG="/config/aprsd.yml"
|
APRSD_CONFIG="/config/aprsd.yml"
|
||||||
if [ ! -e "$APRSD_CONFIG" ]; then
|
if [ ! -e "$APRSD_CONFIG" ]; then
|
||||||
@ -20,4 +26,4 @@ if [ ! -e "$APRSD_CONFIG" ]; then
|
|||||||
aprsd sample-config > $APRSD_CONFIG
|
aprsd sample-config > $APRSD_CONFIG
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec aprsd server -c $APRSD_CONFIG --loglevel DEBUG
|
exec aprsd server -c $APRSD_CONFIG --loglevel ${LOG_LEVEL}
|
||||||
|
@ -9,3 +9,4 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- TZ=America/New_York
|
- TZ=America/New_York
|
||||||
- APRS_PLUGINS=aprsd-slack-plugin>=1.0.2
|
- APRS_PLUGINS=aprsd-slack-plugin>=1.0.2
|
||||||
|
- LOG_LEVEL=ERROR
|
||||||
|
Loading…
Reference in New Issue
Block a user