diff --git a/http.go b/http.go index 1277d59..dde7f06 100644 --- a/http.go +++ b/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