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()) } }