mirror of
https://git.sr.ht/~adnano/go-gemini
synced 2024-12-03 16:48:12 +01:00
server: Make ErrorLog an interface
This commit is contained in:
parent
dfc7a8b3cf
commit
4d2adf4bd0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user