You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
starlog/archive_test.go

18 lines
311 B
Go

package starlog
import (
"testing"
"time"
)
func TestArchiveByDate(t *testing.T) {
l := Std
SetLogFile("test.log", l, true)
StartArchive(l, NewArchiveByDateSize(4096, 24, 2, "test.log",
"_2006_01_02_15_04_05.log", true, nil, nil))
for {
time.Sleep(time.Second)
l.Infoln("hahaha", time.Now())
}
}