修复日志创建目录

This commit is contained in:
whyour 2022-04-04 22:40:02 +08:00
parent be6ca54d9c
commit d703769d43

View File

@ -100,7 +100,7 @@ run_normal() {
log_path="$log_dir/$log_time.log" log_path="$log_dir/$log_time.log"
cmd="&>> $dir_log/$log_path" cmd="&>> $dir_log/$log_path"
[[ "$show_log" == "true" ]] && cmd="" [[ "$show_log" == "true" ]] && cmd=""
make_dir "$log_dir" make_dir "$dir_log/$log_dir"
local begin_time=$(date '+%Y-%m-%d %H:%M:%S') local begin_time=$(date '+%Y-%m-%d %H:%M:%S')
local begin_timestamp=$(date "+%s") local begin_timestamp=$(date "+%s")
@ -169,7 +169,7 @@ run_concurrent() {
log_path="$log_dir/$log_time.log" log_path="$log_dir/$log_time.log"
cmd="&>> $dir_log/$log_path" cmd="&>> $dir_log/$log_path"
[[ "$show_log" == "true" ]] && cmd="" [[ "$show_log" == "true" ]] && cmd=""
make_dir $log_dir make_dir "$dir_log/$log_dir"
local begin_time=$(date '+%Y-%m-%d %H:%M:%S') local begin_time=$(date '+%Y-%m-%d %H:%M:%S')
local begin_timestamp=$(date "+%s") local begin_timestamp=$(date "+%s")
@ -238,7 +238,7 @@ run_designated() {
log_path="$log_dir/$log_time.log" log_path="$log_dir/$log_time.log"
cmd="&>> $dir_log/$log_path" cmd="&>> $dir_log/$log_path"
[[ "$show_log" == "true" ]] && cmd="" [[ "$show_log" == "true" ]] && cmd=""
make_dir $log_dir make_dir "$dir_log/$log_dir"
local begin_time=$(date '+%Y-%m-%d %H:%M:%S') local begin_time=$(date '+%Y-%m-%d %H:%M:%S')
local begin_timestamp=$(date "+%s") local begin_timestamp=$(date "+%s")
@ -301,7 +301,7 @@ run_else() {
log_path="$log_dir/$log_time.log" log_path="$log_dir/$log_time.log"
cmd="&>> $dir_log/$log_path" cmd="&>> $dir_log/$log_path"
[[ "$show_log" == "true" ]] && cmd="" [[ "$show_log" == "true" ]] && cmd=""
make_dir $log_dir make_dir "$dir_log/$log_dir"
local begin_time=$(date '+%Y-%m-%d %H:%M:%S') local begin_time=$(date '+%Y-%m-%d %H:%M:%S')
local begin_timestamp=$(date "+%s") local begin_timestamp=$(date "+%s")