mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
修复日志文件名格式化
This commit is contained in:
parent
403ab7f0f0
commit
9921dab064
|
@ -32,8 +32,8 @@ handle_log_path() {
|
||||||
if [[ ! -z $ID ]]; then
|
if [[ ! -z $ID ]]; then
|
||||||
suffix="_${ID}"
|
suffix="_${ID}"
|
||||||
fi
|
fi
|
||||||
time=$(date "+$time_format")
|
time=$(date "+$mtime_format")
|
||||||
log_time=$(format_log_time "$time_format" "$time")
|
log_time=$(format_log_time "$mtime_format" "$time")
|
||||||
log_dir_tmp="${file_param##*/}"
|
log_dir_tmp="${file_param##*/}"
|
||||||
if [[ $file_param =~ "/" ]]; then
|
if [[ $file_param =~ "/" ]]; then
|
||||||
if [[ $file_param == /* ]]; then
|
if [[ $file_param == /* ]]; then
|
||||||
|
@ -57,6 +57,7 @@ handle_log_path() {
|
||||||
|
|
||||||
format_params() {
|
format_params() {
|
||||||
time_format="%Y-%m-%d %H:%M:%S"
|
time_format="%Y-%m-%d %H:%M:%S"
|
||||||
|
mtime_format="%Y-%m-%d %H:%M:%S.%3N"
|
||||||
timeoutCmd=""
|
timeoutCmd=""
|
||||||
if type timeout &>/dev/null; then
|
if type timeout &>/dev/null; then
|
||||||
timeoutCmd="timeout --foreground -s 14 -k 10s $command_timeout_time "
|
timeoutCmd="timeout --foreground -s 14 -k 10s $command_timeout_time "
|
||||||
|
|
Loading…
Reference in New Issue
Block a user