-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add CronLogAdapter #88 #96
Conversation
Codecov Report
@@ Coverage Diff @@
## master #96 +/- ##
==========================================
+ Coverage 75.93% 75.95% +0.02%
==========================================
Files 74 75 +1
Lines 2863 2866 +3
==========================================
+ Hits 2174 2177 +3
Misses 516 516
Partials 173 173
Continue to review full report at Codecov.
|
otcron/log.go
Outdated
|
||
// Error implements cron.Logger | ||
func (r CronLogAdapter) Error(err error, msg string, keysAndValues ...interface{}) { | ||
_ = level.Error(r.Logging).Log("msg", msg, "error", err, keysAndValues) |
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.
目前都是用err来代表error
otcron/log.go
Outdated
|
||
// Info implements cron.Logger | ||
func (r CronLogAdapter) Info(msg string, keysAndValues ...interface{}) { | ||
_ = level.Info(r.Logging).Log("msg", msg, keysAndValues) |
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.
这里应该是有问题的。建议写个测试。
otcron/log.go
Outdated
@@ -0,0 +1,21 @@ | |||
package otcron |
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.
这个换个名字吧,ot是opentracing的意思,这个和tracing没关系。。
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.
其它我没意见。cc @nfangxu
cronopts/log.go
Outdated
} | ||
|
||
// Info implements cron.Logger | ||
func (r CronLogAdapter) Info(msg string, keysAndValues ...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.
一般接收器变量的命名是接收器类型的第一个小写字母。
No description provided.