| commit | 3b5af9a6dcdae3bfc5ec34947e4023514f75ea9a | [log] [tgz] |
|---|---|---|
| author | Simon Eskildsen <sirup@sirupsen.com> | Thu Sep 25 03:08:26 2014 +0000 |
| committer | Simon Eskildsen <sirup@sirupsen.com> | Thu Sep 25 03:08:26 2014 +0000 |
| tree | 4e1fcde199705164610e9ac70af7bdbbda26632d | |
| parent | 51ca046ebf6497dc0293d82d1162372d79fe47c6 [diff] |
entry: add comment to panic comparison in log()
diff --git a/entry.go b/entry.go index 433b71e..dc2b0a7 100644 --- a/entry.go +++ b/entry.go
@@ -92,6 +92,9 @@ fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err) } + // To avoid Entry#log() returning a value that only would make sense for + // panic() to use in Entry#Panic(), we avoid the allocation by checking + // directly here. if level <= PanicLevel { panic(reader.String()) }