1
0
Fork 0
mirror of https://github.com/Jonny007-MKD/OTR-DecodeAll synced 2024-05-02 20:54:06 +02:00

Redirect errors to stderr

This commit is contained in:
Jonny007-MKD 2015-02-27 18:00:29 +01:00
parent 22100be856
commit 63973a94b8

View file

@ -32,7 +32,11 @@ function funcLog {
echo -e "`date +"%d.%m.%y %T"` ${logMsgTypes[$1]}\t$2" >> $logFile
fi
if [ $1 -le $echoLevel ]; then
echo -e "${logMsgColor[$(($1))]}${logMsgTypes[$1]}:\t$2\033[37m"
if [ $1 -eq 1 ]; then # error
echo -e "${logMsgColor[$1]}${logMsgTypes[$1]}:\t$2\033[37m" >&2
else
echo -e "${logMsgColor[$1]}${logMsgTypes[$1]}:\t$2\033[37m"
fi
fi
}