2022-01-31 20:17:31 +03:00
|
|
|
package rpc
|
2022-01-31 02:31:43 +03:00
|
|
|
|
|
|
|
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{}
|