feat(logging): integrate logrus with custom Gin middleware for enhanced request logging and recovery

- Added `GinLogrusLogger` for structured request logging using Logrus.
- Implemented `GinLogrusRecovery` to handle panics and log stack traces.
- Configured log rotation using Lumberjack for efficient log management.
- Replaced Gin's default logger and recovery middleware with the custom implementations.
This commit is contained in:
Luis Pater
2025-09-22 22:17:12 +08:00
parent c9ce3a5464
commit f1c4caf14a
5 changed files with 114 additions and 7 deletions

1
go.mod
View File

@@ -44,4 +44,5 @@ require (
golang.org/x/sys v0.31.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
)