blob: 9f4076d0ec8d5b1fe0aea5638c7d4c461d8b87af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package log
import (
"os"
)
func Example() {
SetOutput(os.Stdout)
SetLevel(WarningLevel)
SetDate(false)
SetColor(false)
Debug("some debug number: %d\n", 10)
Info("some info number: %d\n", 20)
Warning("some warning number: %d\n", 30)
Error("some error number: %d\n", 40)
// Output:
// [WARN] some warning number: 30
// [ERRO] some error number: 40
}
|