From 4d2adf4bd025e5a238e54b6daeeba9ba17673f75 Mon Sep 17 00:00:00 2001 From: adnano Date: Tue, 23 Feb 2021 11:10:30 -0500 Subject: [PATCH] server: Make ErrorLog an interface --- server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server.go b/server.go index 7d86181..59953ac 100644 --- a/server.go +++ b/server.go @@ -46,7 +46,9 @@ type Server struct { // ErrorLog specifies an optional logger for errors accepting connections, // unexpected behavior from handlers, and underlying file system errors. // If nil, logging is done via the log package's standard logger. - ErrorLog *log.Logger + ErrorLog interface { + Printf(format string, v ...interface{}) + } listeners map[*net.Listener]context.CancelFunc conns map[*net.Conn]context.CancelFunc