forked from limetext/backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.go
56 lines (42 loc) · 1.2 KB
/
global.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
54
55
56
// Copyright 2014 The lime Authors.
// Use of this source code is governed by a 2-clause
// BSD-style license that can be found in the LICENSE file.
package log
var Global Logger
func init() {
Global = NewLogger()
Global.AddFilter("stdout", DEBUG, NewConsoleLogWriter())
}
func AddFilter(name string, level Level, writer LogWriter) {
Global.AddFilter(name, level, writer)
}
func Finest(arg0 interface{}, args ...interface{}) {
Global.Finest(arg0, args...)
}
func Fine(arg0 interface{}, args ...interface{}) {
Global.Fine(arg0, args...)
}
func Debug(arg0 interface{}, args ...interface{}) {
Global.Debug(arg0, args...)
}
func Trace(arg0 interface{}, args ...interface{}) {
Global.Trace(arg0, args...)
}
func Info(arg0 interface{}, args ...interface{}) {
Global.Info(arg0, args...)
}
func Warn(arg0 interface{}, args ...interface{}) error {
return Global.Warn(arg0, args...)
}
func Error(arg0 interface{}, args ...interface{}) error {
return Global.Error(arg0, args...)
}
func Critical(arg0 interface{}, args ...interface{}) error {
return Global.Critical(arg0, args...)
}
func Logf(level Level, format string, args ...interface{}) {
Global.Logf(level, format, args...)
}
func Close() {
Global.Close()
}