mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 15:14:03 +03:00
Add new BindJSON method to a logger
This commit is contained in:
@@ -245,6 +245,9 @@ type Logger interface {
|
||||
// BindStr binds new string parameter to a new logger instance.
|
||||
BindStr(name, value string) Logger
|
||||
|
||||
// BindJSON binds a new JSON-encoded string to a new logger instance.
|
||||
BindJSON(name, value string) Logger
|
||||
|
||||
// Printf is to support log.Logger behavior.
|
||||
Printf(format string, args ...interface{})
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ type NoopLogger struct{}
|
||||
func (n NoopLogger) Named(_ string) Logger { return n }
|
||||
func (n NoopLogger) BindInt(_ string, _ int) Logger { return n }
|
||||
func (n NoopLogger) BindStr(_, _ string) Logger { return n }
|
||||
func (n NoopLogger) BindJSON(_, _ string) Logger { return n }
|
||||
func (n NoopLogger) Printf(_ string, _ ...interface{}) {}
|
||||
func (n NoopLogger) Info(_ string) {}
|
||||
func (n NoopLogger) Warning(_ string) {}
|
||||
|
||||
Reference in New Issue
Block a user