From cb2fe5bc9d1b477e78df52f9b6fffe17af55d71c Mon Sep 17 00:00:00 2001 From: kui Date: Mon, 2 Sep 2024 15:10:00 +0800 Subject: [PATCH] Update log.md Add "FileTimeFormat" to the log configuration file --- docs/tutorials/go-zero-configuration/log.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/tutorials/go-zero-configuration/log.md b/docs/tutorials/go-zero-configuration/log.md index 5d4b726e..a0caaafc 100644 --- a/docs/tutorials/go-zero-configuration/log.md +++ b/docs/tutorials/go-zero-configuration/log.md @@ -49,6 +49,8 @@ type LogConf struct { // daily: daily rotation. // size: size limited rotation. Rotation string `json:",default=daily,options=[daily,size]"` + // FileTimeFormat represents the time format for file name, default is `2006-01-02T15:04:05.000Z07:00`. + FileTimeFormat string `json:",optional"` } ``` @@ -69,3 +71,4 @@ type LogConf struct { | MaxBackups | int | 0 | 文件输出模式,按照大小分割时,最多文件保留个数 | | MaxSize | int | 0 | 文件输出模式,按照大小分割时,单个文件大小 | | Rotation | string | daily | 文件分割模式, daily 按日期 | daily,size | +| FileTimeFormat | string | | 文件名日期格式 |