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

fix: ignore .gen.go suffix in logger to get the real caller when using gen #6785

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

0xJacky
Copy link
Contributor

@0xJacky 0xJacky commented Jan 8, 2024

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

When using gen, the logger always print the caller from xxx.gen.go, this is not convenient for user to debug.
截屏2024-01-08 下午12 55 50

There is an issue also mention this problem #6697.

After ignore this suffix, we can get the real caller in our project from log.
截屏2024-01-08 下午12 52 55

@jinzhu jinzhu merged commit 0123dd4 into go-gorm:master Jan 12, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants