server: Make ErrorLog an interface
This commit is contained in:
parent
4e25d2c3f9
commit
f722747abd
|
@ -46,7 +46,9 @@ type Server struct {
|
||||||
// ErrorLog specifies an optional logger for errors accepting connections,
|
// ErrorLog specifies an optional logger for errors accepting connections,
|
||||||
// unexpected behavior from handlers, and underlying file system errors.
|
// unexpected behavior from handlers, and underlying file system errors.
|
||||||
// If nil, logging is done via the log package's standard logger.
|
// 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
|
listeners map[*net.Listener]context.CancelFunc
|
||||||
conns map[*net.Conn]context.CancelFunc
|
conns map[*net.Conn]context.CancelFunc
|
||||||
|
|
Loading…
Reference in New Issue
Block a user