Fix trace again
This commit is contained in:
parent
686705b4f0
commit
f1dd50b8c6
|
@ -36,7 +36,6 @@ func (sw syslogWriter) Write(p []byte) (n int, err error) {
|
|||
func (sw syslogWriter) WriteLevel(level Level, p []byte) (n int, err error) {
|
||||
switch level {
|
||||
case TraceLevel:
|
||||
err = sw.w.Trace(string(p))
|
||||
case DebugLevel:
|
||||
err = sw.w.Debug(string(p))
|
||||
case InfoLevel:
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
|
||||
package zerolog
|
||||
|
||||
import "testing"
|
||||
import "reflect"
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
type syslogEvent struct {
|
||||
level string
|
||||
|
@ -56,7 +58,6 @@ func TestSyslogWriter(t *testing.T) {
|
|||
log.Error().Msg("error")
|
||||
log.Log().Msg("nolevel")
|
||||
want := []syslogEvent{
|
||||
{"Trace", `{"level":"trace","message":"trace"}` + "\n"},
|
||||
{"Debug", `{"level":"debug","message":"debug"}` + "\n"},
|
||||
{"Info", `{"level":"info","message":"info"}` + "\n"},
|
||||
{"Warning", `{"level":"warn","message":"warn"}` + "\n"},
|
||||
|
|
Loading…
Reference in New Issue