-
Notifications
You must be signed in to change notification settings - Fork 28
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
Logger init panic #57
Conversation
log/roller.go
Outdated
@@ -41,6 +41,7 @@ var ( | |||
lumberjacksLocker sync.Mutex | |||
|
|||
errInvalidRollerParameter = errors.New("invalid roller parameter") | |||
errTimeZero = errors.New("time is not zero") |
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.
errTimeZero = errors.New("time is not zero") | |
errTimeZero = errors.New("time should not be zero") |
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.
fix
Codecov Report
@@ Coverage Diff @@
## master #57 +/- ##
==========================================
+ Coverage 44.71% 45.23% +0.51%
==========================================
Files 45 46 +1
Lines 2630 2642 +12
==========================================
+ Hits 1176 1195 +19
+ Misses 1372 1368 -4
+ Partials 82 79 -3
Continue to review full report at Codecov.
|
log/roller_test.go
Outdated
if defaultRoller.MaxSize != 100 || defaultRoller.Compress != false { | ||
t.Errorf("ParseRoller failed") | ||
} | ||
/* |
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.
we'd better fix it instead of removing it. It's not a good idea to remove the existing test case.
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.
fix
@YIDWang Could you please paste the backtrace of panic? I'm not sure this PR is the proper way to fix it. |
|
@YIDWang Thanks, got it. |
修复日志的 panic
Fixes #56