File: filewriter_test.go

package info (click to toggle)
golang-github-lunny-log 0.0~git20160921.0.7887c61-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 100 kB
  • sloc: makefile: 6
file content (20 lines) | stat: -rw-r--r-- 298 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()
}