g.log: format Excessive prefix(前缀多余)
Go version
go version go1.22.5 linux/amd64
GoFrame version
2.7.1
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
logger:
path: "./logs"
level: "all"
stdout: true
file: "{Y-m-d}.log"
timeFormat: "2006-01-02 15:04:05"
g.Log().Info(ctx,log...) 2024-08-05T01:52:25.193000486Z 2024-08-05 09:52:25 [INFO]xxxxxxxx......
(default)+config(format)+[INFO]+log After configuration, prefix repetition time。
What did you see happen?
logger:
path: "./logs"
level: "all"
stdout: true
file: "{Y-m-d}.log"
timeFormat: "2006-01-02 15:04:05"
g.Log().Info(ctx,log...) ~~2024-08-05T01:52:25.193000486Z~~ 2024-08-05 09:52:25 [INFO]xxxxxxxx...... config(format)+[INFO]+log
What did you expect to see?
logger:
path: "./logs"
level: "all"
stdout: true
file: "{Y-m-d}.log"
timeFormat: "2006-01-02 15:04:05"
g.Log().Info(ctx,log...) ~~2024-08-05T01:52:25.193000486Z~~ 2024-08-05 09:52:25 [INFO]xxxxxxxx...... config(format)+[INFO]+log
After testing I can't reproduce your bug! if you confirm that the bug exists in gf v2.7.2, please you provide more information! Thanks!
Also, http.logger config item can't works on the g.log. Please review config file.
经过测试,无法在 v2.7.2 复现你的问题,如果确认该问题确实存在,请提供更多信息,谢谢!
另外,http.logger 配置项无法影响 g.log,请重新检查配置文件。
@wordgao I could not reproduce this issue either.