refactor: adjust access log
This commit is contained in:
parent
bf6eb24aff
commit
1bded8e751
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
|
@ -18,7 +18,7 @@ func main() {
|
||||||
e := elton.New()
|
e := elton.New()
|
||||||
|
|
||||||
e.Use(middleware.NewLogger(middleware.LoggerConfig{
|
e.Use(middleware.NewLogger(middleware.LoggerConfig{
|
||||||
Format: middleware.LoggerCombined,
|
Format: `{real-ip} {when-iso} "{method} {uri} {proto}" {status} {size-human} "{userAgent}"`,
|
||||||
OnLog: func(s string, _ *elton.Context) {
|
OnLog: func(s string, _ *elton.Context) {
|
||||||
fmt.Println(s)
|
fmt.Println(s)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue