samber / slog-gin

🚨 Gin middleware for slog logger
https://pkg.go.dev/github.com/samber/slog-gin
MIT License
115 stars 13 forks source link

increase configuration options #11

Closed hakwik closed 9 months ago

hakwik commented 9 months ago

Would something like this help with #10 ?

samber commented 9 months ago

Closing, since we changed the record format:

{
    "time": "xyz",   // from handler
    "request": {
        "time": "xyz", // request time, from middleware
        "path": "/hello/world",
        ...
    },
    "response": {
        "time": "xyz", // response time, from middleware
        "duration": "10ms",
        "status": 200,
        ...
    },
    ...
}