-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Move code.gitea.io/gitea/modules/log to code.gitea.io/log as a standalone package #6970
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change imports to "code.gitea.io/log"
cmd/admin.go
Outdated
@@ -15,7 +15,7 @@ import ( | |||
"code.gitea.io/gitea/modules/auth/oauth2" | |||
"code.gitea.io/gitea/modules/generate" | |||
"code.gitea.io/gitea/modules/git" | |||
"code.gitea.io/gitea/modules/log" | |||
"gitea.com/gitea/log" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"gitea.com/gitea/log" | |
"code.gitea.io/log" |
1c7489a
to
248a0e2
Compare
Codecov Report
@@ Coverage Diff @@
## master #6970 +/- ##
==========================================
- Coverage 40.98% 40.32% -0.66%
==========================================
Files 462 446 -16
Lines 62584 61376 -1208
==========================================
- Hits 25648 24749 -899
+ Misses 33574 33303 -271
+ Partials 3362 3324 -38
Continue to review full report at Codecov.
|
Ready to review. |
If we can get #6993 in first we can get rid of the gitlog weirdness too. |
248a0e2
to
21a6e1a
Compare
@zeripath rebased |
Thanks @lunny. |
d93303a
to
64de645
Compare
99fac9b
to
8e9b957
Compare
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
@@ -39,7 +39,7 @@ func CheckConsistencyFor(t *testing.T, beansToCheck ...interface{}) { | |||
ptrToSliceValue := reflect.New(sliceType) | |||
ptrToSliceValue.Elem().Set(sliceValue) | |||
|
|||
assert.NoError(t, x.Where(bean).Find(ptrToSliceValue.Interface())) | |||
assert.NoError(t, x.Table(bean).Find(ptrToSliceValue.Interface())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will open a new PR to instead this one. It's unrelated but should be a bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lunny can you reverence the PR to tis bugfix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the log -> #7271
I wonder if gitea could switch to https://github.com/go-logr/logr which defines a logging interface. Then you can plug in https://github.com/uber-go/zap using https://github.com/go-logr/zapr . zap is a very high perf logging library and this logr is getting used in the Kubernetes project. I wonder if Gitea really needs to maintain its own logging library. |
@tamalsaha I don't think Gitea should maintain a logging library itself except no logs could satisfy it's requirements. |
Is there any issue or doc that explains what are the required features? Or some doc that explains the limitation of other logging libraries? |
@tamalsaha I think we have no. Only have docs about logging https://docs.gitea.io/zh-cn/logging-configuration/ |
I will close this since it's difficult to rebase the PR. |
This PR will move
code.gitea.io/gitea/modules/log
tocode.gitea.io/log
as a standalone package so that other projects (i.e. tea) could use the log package but not import all the gitea packages.