diff options
Diffstat (limited to 'plugins/logger/std_log_adapter.go')
-rw-r--r-- | plugins/logger/std_log_adapter.go | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/plugins/logger/std_log_adapter.go b/plugins/logger/std_log_adapter.go deleted file mode 100644 index 479aa565..00000000 --- a/plugins/logger/std_log_adapter.go +++ /dev/null @@ -1,26 +0,0 @@ -package logger - -import ( - "github.com/spiral/roadrunner/v2/utils" -) - -// StdLogAdapter can be passed to the http.Server or any place which required standard logger to redirect output -// to the logger plugin -type StdLogAdapter struct { - log Logger -} - -// Write io.Writer interface implementation -func (s *StdLogAdapter) Write(p []byte) (n int, err error) { - s.log.Error("server internal error", "message", utils.AsString(p)) - return len(p), nil -} - -// NewStdAdapter constructs StdLogAdapter -func NewStdAdapter(log Logger) *StdLogAdapter { - logAdapter := &StdLogAdapter{ - log: log, - } - - return logAdapter -} |