func Test_CreateLogFailure(t *testing.T) { e := llog.New("/foo/bar", llog.INFO) if e == nil { t.Error("failed to provoke creation error!") return } }
func Test_OpenLog(t *testing.T) { pe("Error", "Cannot be seen") e := llog.New(f, llog.INFO) if e != nil { t.Error("failed to open log : " + e.Error()) return } pi("Info", "Line 1") }
func Test_CreateLog(t *testing.T) { e := llog.New(f, llog.INFO) if e != nil { t.Error("failed to create log : " + e.Error()) return } pm("", "Start of test") llog.Close() }
func Example() { e := llog.New("/foo/bar", llog.INFO) if e != nil { fmt.Println("failed to create log : " + e.Error()) return } llog.PrintInfo("My ID", "Test of llog") llog.Close() }
func Test_Rotate(t *testing.T) { e := llog.New(fr, llog.INFO) if e != nil { t.Error("failed to open log : " + e.Error()) return } pi("Info", "Line 1 pre rotate") pi("Info", "Line 2 pre rotate") e = llog.Rotate(3) if e != nil { t.Error("failed to rotate log : " + e.Error()) return } pi("Info", "Line 1 after rotate") pi("Info", "Line 2 after rotate") }