-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathlog_test.go
53 lines (49 loc) · 1.1 KB
/
log_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/***************************************************************
*
* Copyright (c) 2014, Menglong TAN <[email protected]>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GPL licence
*
**************************************************************/
/**
*
*
* @file log_test.go
* @author Menglong TAN <[email protected]>
* @date Thu Nov 20 15:11:58 2014
*
**/
package main
import (
"github.com/crackcell/hpipe/log"
"os"
"testing"
)
func TestAll(t *testing.T) {
l := log.New(os.Stdout, "test_logger ", log.LOG_LEVEL_ALL)
l.Debug("debug")
l.Debugf("%s", "debug")
l.Trace("trace")
l.Tracef("%s", "trace")
l.Info("info")
l.Infof("%s", "info")
l.Warn("warn")
l.Warnf("%s", "warn")
l.Error("error")
l.Errorf("%s", "error")
l.Fatal("fatal")
l.Fatalf("%s", "fatal")
log.Debug("debug")
log.Debugf("%s", "debug")
log.Trace("trace")
log.Tracef("%s", "trace")
log.Info("info")
log.Infof("%s", "info")
log.Warn("warn")
log.Warnf("%s", "warn")
log.Error("error")
log.Errorf("%s", "error")
log.Fatal("fatal")
log.Fatalf("%s", "fatal")
}