Skip to content

Commit

Permalink
Fix missing newline in IncreaseLevel error messages (uber-go#828)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteelPhase authored and uvfive committed May 21, 2020
1 parent a040928 commit 32d7c9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion increase_level_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestIncreaseLevelTryDecrease(t *testing.T) {
newLoggedEntry(ErrorLevel, "increase level error log"),
}, logs.AllUntimed(), "unexpected logs")
assert.Equal(t,
`failed to IncreaseLevel: invalid increase level, as level "info" is allowed by increased level, but not by existing core`,
"failed to IncreaseLevel: invalid increase level, as level \"info\" is allowed by increased level, but not by existing core\n",
errorOut.String(),
"unexpected error output",
)
Expand Down
2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func IncreaseLevel(lvl zapcore.LevelEnabler) Option {
return optionFunc(func(log *Logger) {
core, err := zapcore.NewIncreaseLevelCore(log.core, lvl)
if err != nil {
fmt.Fprintf(log.errorOutput, "failed to IncreaseLevel: %v", err)
fmt.Fprintf(log.errorOutput, "failed to IncreaseLevel: %v\n", err)
} else {
log.core = core
}
Expand Down

0 comments on commit 32d7c9f

Please sign in to comment.