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

After log rotation, log file name is too long #1672

Closed
shou55 opened this issue Mar 15, 2022 · 1 comment
Closed

After log rotation, log file name is too long #1672

shou55 opened this issue Mar 15, 2022 · 1 comment
Labels
bug It is confirmed a bug, but don't worry, we'll handle it. done This issue is done, which may be release in next version.

Comments

@shou55
Copy link

shou55 commented Mar 15, 2022

1. What version of Go and system type/arch are you using?

go version go1.16.3 linux/amd64

CentOS Linux release 7.9.2009 (Core)
Linux 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

2. What version of GoFrame are you using?

gf v1.16.6

3. Can this issue be re-produced with the latest release?

not tested

4. What did you do?

config.toml

[logger]
  Path=                  "./log"
  Level=                 "all"
  Stdout=                false
  RotateExpire=            "2s"
  RotateBackupLimit=     10
  RotateBackupExpire=    "7d"
  RotateCheckInterval=   "5s"

main.go

func main() {
	for {
		g.Log().Info(grand.Letters(150))
		time.Sleep(3 * time.Second)
	}
}

RotateSize works fine
RotateExpire not working properly

5. What did you expect to see?

The name of the log file is too long, e.g.
2022-03-15.20220315133906826583.20220315133911827353.20220315133916833606.20220315133921826619.20220315133926827509.20220315133931837886.20220315133936827193.20220315133941852119.20220315133946827389.20220315133951834830.20220315133956827832.log

Please shorten the name of the log file

@wenzi1 wenzi1 added bug It is confirmed a bug, but don't worry, we'll handle it. done This issue is done, which may be release in next version. labels May 17, 2022
@wenzi1
Copy link
Member

wenzi1 commented May 17, 2022

#1844

@gqcn gqcn closed this as completed Aug 11, 2022
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. done This issue is done, which may be release in next version.
Projects
None yet
Development

No branches or pull requests

3 participants