2017-02-14 04:54:11 +01:00
|
|
|
package logger
|
|
|
|
|
|
|
|
// Config are the options of the logger middlweare
|
|
|
|
// contains 4 bools
|
|
|
|
// Status, IP, Method, Path
|
|
|
|
// if set to true then these will print
|
|
|
|
type Config struct {
|
|
|
|
// Status displays status code (bool)
|
|
|
|
Status bool
|
|
|
|
// IP displays request's remote address (bool)
|
|
|
|
IP bool
|
|
|
|
// Method displays the http method (bool)
|
|
|
|
Method bool
|
|
|
|
// Path displays the request path (bool)
|
|
|
|
Path bool
|
|
|
|
}
|
|
|
|
|
2017-06-11 22:58:34 +02:00
|
|
|
// DefaultConfiguration returns an options which all properties are true except EnableColors
|
|
|
|
func DefaultConfiguration() Config {
|
2017-02-14 04:54:11 +01:00
|
|
|
return Config{true, true, true, true}
|
|
|
|
}
|