(t *testing.T)
| 1074 | } |
| 1075 | |
| 1076 | func TestLoggerShouldWithNilWriter(t *testing.T) { |
| 1077 | // Create a logger with nil writer to test the should method's nil check |
| 1078 | log := Logger{w: nil, level: TraceLevel} |
| 1079 | |
| 1080 | e := log.Info() |
| 1081 | if e != nil { |
| 1082 | t.Error("Expected nil event when writer is nil") |
| 1083 | } |
| 1084 | } |
| 1085 | |
| 1086 | func TestContextTimestamp(t *testing.T) { |
| 1087 | TimestampFunc = func() time.Time { |