equal
deleted
inserted
replaced
8 |
8 |
9 var ( |
9 var ( |
10 // If any of these are non-nil when NewClient() is called, |
10 // If any of these are non-nil when NewClient() is called, |
11 // they will be used to log messages of the indicated |
11 // they will be used to log messages of the indicated |
12 // severity. |
12 // severity. |
13 Warn Logger = &noLog{} |
13 Warn Logger = &noLog{} |
14 Info Logger = &noLog{} |
14 Info Logger = &noLog{} |
15 Debug Logger = &noLog{} |
15 Debug Logger = &noLog{} |
16 ) |
16 ) |
17 |
17 |
18 // Anything implementing Logger can receive log messages from the XMPP |
18 // Anything implementing Logger can receive log messages from the XMPP |
19 // library. The default implementation doesn't log anything; it |
19 // library. The default implementation doesn't log anything; it |
25 |
25 |
26 type noLog struct { |
26 type noLog struct { |
27 flags int |
27 flags int |
28 prefix string |
28 prefix string |
29 } |
29 } |
|
30 |
30 var _ Logger = &noLog{} |
31 var _ Logger = &noLog{} |
31 |
32 |
32 func (l *noLog) Log(v ...interface{}) { |
33 func (l *noLog) Log(v ...interface{}) { |
33 } |
34 } |
34 |
35 |