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

os/log: extra time prefix #3720

Closed
wordgao opened this issue Aug 5, 2024 · 2 comments
Closed

os/log: extra time prefix #3720

wordgao opened this issue Aug 5, 2024 · 2 comments
Labels
bug It is confirmed a bug, but don't worry, we'll handle it. cannot reproduce We cannot reproduce it, it might resolved in new version or you should give more details.

Comments

@wordgao
Copy link

wordgao commented Aug 5, 2024

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

@wordgao wordgao added the bug It is confirmed a bug, but don't worry, we'll handle it. label Aug 5, 2024
@oldme-git
Copy link
Member

oldme-git commented Aug 6, 2024

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,请重新检查配置文件。

@oldme-git oldme-git added the cannot reproduce We cannot reproduce it, it might resolved in new version or you should give more details. label Aug 6, 2024
@gqcn
Copy link
Member

gqcn commented Sep 12, 2024

@wordgao I could not reproduce this issue either.

@gqcn gqcn closed this as completed Sep 12, 2024
@gqcn gqcn changed the title g.log: format Excessive prefix(前缀多余) os/log: extra time prefix Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It is confirmed a bug, but don't worry, we'll handle it. cannot reproduce We cannot reproduce it, it might resolved in new version or you should give more details.
Projects
None yet
Development

No branches or pull requests

3 participants