diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2022-01-31 02:31:43 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2022-01-31 02:31:43 +0300 |
commit | 440f3f4604f3489113f6705b8da67d839e52360e (patch) | |
tree | 9bc04f896cc79cbb4bb41adbe19aaaaa0592acba /logger.go |
initial
Diffstat (limited to 'logger.go')
-rw-r--r-- | logger.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/logger.go b/logger.go new file mode 100644 index 0000000..7907e4f --- /dev/null +++ b/logger.go @@ -0,0 +1,20 @@ +package jsonrpc2 + +import "log" + +type Logger interface { + Logf(format string, args ...interface{}) +} + +type nopLogger struct{} + +func (n nopLogger) Logf(format string, args ...interface{}) { +} + +type stdLogger struct{} + +func (n stdLogger) Logf(format string, args ...interface{}) { + log.Printf(format, args...) +} + +var StdLogger = stdLogger{} |