delete default console & add bench test

This commit is contained in:
astaxie
2013-08-28 15:48:43 +08:00
parent b96f7e2ef2
commit 2424618163
5 changed files with 25 additions and 3 deletions

View File

@@ -99,3 +99,12 @@ func exists(path string) (bool, error) {
}
return false, err
}
func BenchmarkFile(b *testing.B) {
log := NewLogger(100000)
log.SetLogger("file", `{"filename":"test4.log"}`)
for i := 0; i < b.N; i++ {
log.Trace("trace")
}
os.Remove("test4.log")
}