Logger: defaulting debug level to zero.

While loading configuration it will check for new config files and
copy them to user's home directory.
This commit is contained in:
2015-12-26 22:16:17 +05:00
parent 158a492a8e
commit e284e32b74
2 changed files with 23 additions and 0 deletions

View File

@@ -17,6 +17,18 @@ function log() {
fi
}
# We are defaulting our DEBUG level to 0.
# This value can be overriden with prepending "DEBUG=1" while launching
# this script.
# DEBUG_LEVEL will be taken from configuration.
if [ -z ${DEBUG_LEVEL} ]; then
DEBUG_LEVEL=0
fi
if [ -z ${DEBUG} ]; then
DEBUG=0
fi
function log_common() {
# Executes some common things for logs.
local DEBUG_LVL=$1