changed the Config class to support the new interface to log objects
Dieser Commit ist enthalten in:
Ursprung
9e63f58de6
Commit
c3305139d4
6
http.go
6
http.go
|
@ -20,11 +20,13 @@ type Config struct {
|
|||
Keyfile string
|
||||
}
|
||||
|
||||
// MarshalLogObject adds the information over the object to the *log.Entry
|
||||
func (c *Config) MarshalLogObject(e *log.Entry) {
|
||||
// MarshalObject adds the information over the object to the *log.Entry
|
||||
func (c *Config) MarshalObject(e *log.Entry) {
|
||||
e.Str("Address", c.Addr).Bool("TLS", c.TLSconfig != nil).Strs("Cert", []string{c.Certfile, c.Keyfile})
|
||||
}
|
||||
|
||||
var _ log.ObjectMarshaler = &Config{}
|
||||
|
||||
// Server is an wrapper for the *http.Server and *gin.Engine
|
||||
type Server struct {
|
||||
http *http.Server
|
||||
|
|
Laden…
In neuem Issue referenzieren