changed message to local val msg
This commit is contained in:
parent
05a9822361
commit
19721380b5
@ -25,13 +25,14 @@ log() {
|
||||
if [ -f "$log_file" ]; then
|
||||
touch $log_file
|
||||
fi
|
||||
if [ $(wc -l < $log_file) > 100000 ]; then
|
||||
|
||||
if [[ "$(wc -l < $log_file)" > "100000" ]]; then
|
||||
# remove first line
|
||||
sed -e 1d -i $log_file
|
||||
fi
|
||||
message="$(date +'%D_%T'): $*"
|
||||
printf "$message\n" >&2
|
||||
printf "$message\n" >> $log_file
|
||||
local msg="$(date +'%Y-%m-%d_%T'): $*"
|
||||
printf "$msg\n" >&2
|
||||
printf "$msg\n" >> $log_file
|
||||
}
|
||||
|
||||
log_debug() {
|
||||
|
Loading…
Reference in New Issue
Block a user