Skip to content

Commit

Permalink
Merge pull request #138 from louyuexing/patch-1
Browse files Browse the repository at this point in the history
Add "FileTimeFormat" to the log configuration file
  • Loading branch information
kevwan authored Sep 8, 2024
2 parents c158d8a + cb2fe5b commit 49f6672
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/tutorials/go-zero-configuration/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

```
Expand All @@ -69,3 +71,4 @@ type LogConf struct {
| MaxBackups | int | 0 | 文件输出模式,按照大小分割时,最多文件保留个数 |
| MaxSize | int | 0 | 文件输出模式,按照大小分割时,单个文件大小 |
| Rotation | string | daily | 文件分割模式, daily 按日期 | daily,size |
| FileTimeFormat | string | | 文件名日期格式 |

0 comments on commit 49f6672

Please sign in to comment.