Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "FileTimeFormat" to the log configuration file #138

Merged
merged 1 commit into from
Sep 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | | 文件名日期格式 |
Loading