Skip to content

Commit

Permalink
Merge pull request 17media#1 from 17media/panic-message
Browse files Browse the repository at this point in the history
Use log message as panic message instead of Entry struct
  • Loading branch information
Jacky Chen authored Feb 25, 2019
2 parents 4f5fd63 + aae516e commit 001166a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (entry Entry) log(level Level, msg string) {
// panic() to use in Entry#Panic(), we avoid the allocation by checking
// directly here.
if level <= PanicLevel {
panic(&entry)
panic(msg)
}
}

Expand Down Expand Up @@ -392,4 +392,4 @@ func (entry *Entry) Panicln(args ...interface{}) {
func (entry *Entry) sprintlnn(args ...interface{}) string {
msg := fmt.Sprintln(args...)
return msg[:len(msg)-1]
}
}

0 comments on commit 001166a

Please sign in to comment.