File: log.go

package info (click to toggle)
golang-github-optiopay-kafka 0.0~git20150921.0.bc8e095-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 400 kB
  • ctags: 461
  • sloc: sh: 45; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 719 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package kafka

// Logger is general logging interface that can be provided by popular logging
// frameworks.
//
// * https://github.com/go-kit/kit/tree/master/log
// * https://github.com/husio/log
type Logger interface {
	Debug(msg string, args ...interface{})
	Info(msg string, args ...interface{})
	Warn(msg string, args ...interface{})
	Error(msg string, args ...interface{})
}

// nullLogger implements Logger interface, but discards all messages
type nullLogger struct {
}

func (nullLogger) Debug(msg string, args ...interface{}) {}
func (nullLogger) Info(msg string, args ...interface{})  {}
func (nullLogger) Warn(msg string, args ...interface{})  {}
func (nullLogger) Error(msg string, args ...interface{}) {}