-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
陈壁浩
committed
Jul 26, 2024
1 parent
05f6864
commit 7d23808
Showing
29 changed files
with
614 additions
and
418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,47 @@ | ||
## drivers(启用的日志通道)默认值: [console] | ||
## level(日志等级)默认值: info | ||
## formatter(格式化器)默认值: text | ||
## folder(文件目录)默认值取 app 的 LogFolder地址 | ||
## file(文件名)默认值:app.log | ||
|
||
driver: console | ||
formatter: text | ||
# 启用的日志通道 | ||
drivers: [console,single,rotate,rolling] | ||
level: trace | ||
formatter: text | ||
folder: ./storage/log/ | ||
|
||
#driver: single | ||
#level: trace | ||
#folder: ./storage/log/single | ||
#file: gob_single.log | ||
# 控制台输出 | ||
console: | ||
level: info | ||
formatter: text | ||
|
||
#driver: rotate # 切割日志 | ||
#level: trace # 日志级别 | ||
#file: gob.log # 保存的日志文件 | ||
#rotate_count: 10 # 最多日志文件个数 | ||
#rotate_size: 120000 # 每个日志大小 | ||
#rotate_time: "1m" # 切割时间 | ||
#max_age: "10d" # 文件保存时间 | ||
#date_format: "%Y-%m-%d-%H-%M" # 文件后缀格式 | ||
# 单文件输出 | ||
single: | ||
level: info | ||
folder: ./storage/log/ | ||
file: app.log | ||
|
||
#driver: aliyun_sls | ||
#level: trace | ||
#formatter: json | ||
# 按日期切割(rotate库已于21年存档,寻找替代品准备移除) | ||
rotate: | ||
level: info # 日志级别 | ||
folder: ./storage/log/ # 日志文件 | ||
file: app_rotate.log # 保存的日志文件 | ||
rotate_count: 10 # 最多日志文件个数 | ||
rotate_size: 1048576 # 每个日志大小(byte) | ||
rotate_time: "1d" # 切割时间 | ||
max_age: "90d" # 文件保存时间 | ||
date_format: "%Y-%m-%d" # 文件后缀格式 | ||
|
||
#################### 改造成: https://blog.csdn.net/xmcy001122/article/details/119916227 | ||
# 按容量切割(缺少按日切割功能) | ||
rolling: | ||
level: info # 日志级别 | ||
folder: ./storage/log/ # 日志文件 | ||
file: app_rolling.log # 保存的日志文件 | ||
maxSize: 1 # 文件大小(mb) 0为不限制 | ||
maxAge: 0 # 保留旧日志文件的最大天数 0为不限制 | ||
maxBackups: 0 # 保留旧日志文件的最大数量 0为不限制 | ||
|
||
# 启用的日志通道 | ||
#enable: console,single | ||
# | ||
#console: | ||
# level: trace | ||
# formatter: text | ||
# | ||
#single: | ||
# level: trace | ||
# folder: ./storage/log/ | ||
# file: gob_single.log | ||
# | ||
#rotate: | ||
# level: trace # 日志级别 | ||
# folder: ./storage/log/ | ||
# file: gob_rotate.log # 保存的日志文件 | ||
# rotate_count: 10 # 最多日志文件个数 | ||
# rotate_size: 120000 # 每个日志大小 | ||
# rotate_time: "1m" # 切割时间 | ||
# max_age: "10d" # 文件保存时间 | ||
# date_format: "%Y-%m-%d-%H-%M" # 文件后缀格式 | ||
# | ||
#aliyun_sls: | ||
# level: trace | ||
# formatter: json | ||
# 阿里云的 SLS 日志 | ||
aliyun_sls: | ||
level: info | ||
formatter: json |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.