mirror of
https://github.com/kataras/iris.git
synced 2025-12-22 20:37:05 +00:00
20 days of unstoppable work. Waiting fo go 1.8, I didn't finish yet, some touches remains.
Former-commit-id: ed84f99c89f43fe5e980a8e6d0ee22c186f0e1b9
This commit is contained in:
21
middleware/logger/config.go
Normal file
21
middleware/logger/config.go
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
}
|
||||
|
||||
// DefaultConfig returns an options which all properties are true except EnableColors
|
||||
func DefaultConfig() Config {
|
||||
return Config{true, true, true, true}
|
||||
}
|
||||
Reference in New Issue
Block a user