A compatible log extension
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
log/filewriter_test.go

21 lines
298 B

package log
import (
"os"
"testing"
)
func TestFiles(t *testing.T) {
os.Remove("./logs")
w := NewFileWriter(FileOptions{
ByType: ByDay,
Dir: "./logs",
})
Std.SetOutput(w)
Std.SetFlags(Std.Flags() | ^Llongcolor | ^Lshortcolor)
Info("test")
Debug("ssss")
Warn("ssss")
w.Close()
}