mirror of
https://github.com/deajan/obackup.git
synced 2025-01-12 15:13:53 +01:00
Added loglevel to log filesé
This commit is contained in:
parent
192e1d2f65
commit
b27ee4f8c1
@ -8,7 +8,7 @@ PROGRAM_VERSION=2.0-pre
|
|||||||
PROGRAM_BUILD=2016030301
|
PROGRAM_BUILD=2016030301
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
## FUNC_BUILD=2016021803
|
## FUNC_BUILD=2016030301
|
||||||
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
||||||
|
|
||||||
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
||||||
@ -107,15 +107,15 @@ function Logger {
|
|||||||
# </OSYNC SPECIFIC>
|
# </OSYNC SPECIFIC>
|
||||||
|
|
||||||
if [ "$level" == "CRITICAL" ]; then
|
if [ "$level" == "CRITICAL" ]; then
|
||||||
_Logger "$prefix\e[41m$value\e[0m" "$prefix$value"
|
_Logger "$prefix\e[41m$level:$value\e[0m" "$prefix$value"
|
||||||
ERROR_ALERT=1
|
ERROR_ALERT=1
|
||||||
return
|
return
|
||||||
elif [ "$level" == "ERROR" ]; then
|
elif [ "$level" == "ERROR" ]; then
|
||||||
_Logger "$prefix\e[91m$value\e[0m" "$prefix$value"
|
_Logger "$prefix\e[91m$level:$value\e[0m" "$prefix$value"
|
||||||
ERROR_ALERT=1
|
ERROR_ALERT=1
|
||||||
return
|
return
|
||||||
elif [ "$level" == "WARN" ]; then
|
elif [ "$level" == "WARN" ]; then
|
||||||
_Logger "$prefix\e[93m$value\e[0m" "$prefix$value"
|
_Logger "$prefix\e[93m$level:$value\e[0m" "$prefix$value"
|
||||||
WARN_ALERT=1
|
WARN_ALERT=1
|
||||||
return
|
return
|
||||||
elif [ "$level" == "NOTICE" ]; then
|
elif [ "$level" == "NOTICE" ]; then
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
## FUNC_BUILD=2016021803
|
## FUNC_BUILD=2016030301
|
||||||
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
||||||
|
|
||||||
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
||||||
@ -97,15 +97,15 @@ function Logger {
|
|||||||
# </OSYNC SPECIFIC>
|
# </OSYNC SPECIFIC>
|
||||||
|
|
||||||
if [ "$level" == "CRITICAL" ]; then
|
if [ "$level" == "CRITICAL" ]; then
|
||||||
_Logger "$prefix\e[41m$value\e[0m" "$prefix$value"
|
_Logger "$prefix\e[41m$level:$value\e[0m" "$prefix$value"
|
||||||
ERROR_ALERT=1
|
ERROR_ALERT=1
|
||||||
return
|
return
|
||||||
elif [ "$level" == "ERROR" ]; then
|
elif [ "$level" == "ERROR" ]; then
|
||||||
_Logger "$prefix\e[91m$value\e[0m" "$prefix$value"
|
_Logger "$prefix\e[91m$level:$value\e[0m" "$prefix$value"
|
||||||
ERROR_ALERT=1
|
ERROR_ALERT=1
|
||||||
return
|
return
|
||||||
elif [ "$level" == "WARN" ]; then
|
elif [ "$level" == "WARN" ]; then
|
||||||
_Logger "$prefix\e[93m$value\e[0m" "$prefix$value"
|
_Logger "$prefix\e[93m$level:$value\e[0m" "$prefix$value"
|
||||||
WARN_ALERT=1
|
WARN_ALERT=1
|
||||||
return
|
return
|
||||||
elif [ "$level" == "NOTICE" ]; then
|
elif [ "$level" == "NOTICE" ]; then
|
||||||
|
@ -8,7 +8,7 @@ PROGRAM_VERSION=2.0-pre
|
|||||||
PROGRAM_BUILD=2016030301
|
PROGRAM_BUILD=2016030301
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
## FUNC_BUILD=2016021803
|
## FUNC_BUILD=2016030301
|
||||||
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
||||||
|
|
||||||
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
||||||
@ -102,15 +102,15 @@ function Logger {
|
|||||||
# </OSYNC SPECIFIC>
|
# </OSYNC SPECIFIC>
|
||||||
|
|
||||||
if [ "$level" == "CRITICAL" ]; then
|
if [ "$level" == "CRITICAL" ]; then
|
||||||
_Logger "$prefix\e[41m$value\e[0m" "$prefix$value"
|
_Logger "$prefix\e[41m$level:$value\e[0m" "$prefix$value"
|
||||||
ERROR_ALERT=1
|
ERROR_ALERT=1
|
||||||
return
|
return
|
||||||
elif [ "$level" == "ERROR" ]; then
|
elif [ "$level" == "ERROR" ]; then
|
||||||
_Logger "$prefix\e[91m$value\e[0m" "$prefix$value"
|
_Logger "$prefix\e[91m$level:$value\e[0m" "$prefix$value"
|
||||||
ERROR_ALERT=1
|
ERROR_ALERT=1
|
||||||
return
|
return
|
||||||
elif [ "$level" == "WARN" ]; then
|
elif [ "$level" == "WARN" ]; then
|
||||||
_Logger "$prefix\e[93m$value\e[0m" "$prefix$value"
|
_Logger "$prefix\e[93m$level:$value\e[0m" "$prefix$value"
|
||||||
WARN_ALERT=1
|
WARN_ALERT=1
|
||||||
return
|
return
|
||||||
elif [ "$level" == "NOTICE" ]; then
|
elif [ "$level" == "NOTICE" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user