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 logger path bug #5836

Merged
merged 2 commits into from Nov 5, 2022
Merged

fix logger path bug #5836

merged 2 commits into from Nov 5, 2022

Conversation

kvii
Copy link
Contributor

@kvii kvii commented Nov 4, 2022

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

What did this pull request do?

To fix logger path bug. aa4312e

User Case Description

before:

➜  app go run .
2022/11/04 21:10:29 /Users/kvii/go/pkg/mod/gorm.io/gorm@v1.24.1/callbacks.go:134
[0.004ms] [rows:0] SELECT 1

after:

➜  app go run .
2022/11/04 20:58:48 /Users/kvii/workspace/qs/gormt/app/main.go:14
[0.005ms] [rows:0] SELECT 1

utils/utils.go Outdated
if filepath.Base(parent) == "gorm.io" {
return parent
}
return dir
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the returned source dir is better to includefilepath.Separator at the end?

Copy link
Contributor Author

@kvii kvii Nov 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not create a new release. There is a bug in windows.

Copy link
Contributor Author

@kvii kvii Nov 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created a new PR #5844 to solve it.

@jinzhu jinzhu merged commit 871f1de into go-gorm:master Nov 5, 2022
@kvii kvii mentioned this pull request Nov 5, 2022
3 tasks
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.

None yet

2 participants