Skip logging non-api routes
Signed-off-by: Steven Kriegler <sk.bunsenbrenner@gmail.com>
This commit is contained in:
parent
f59a6530b8
commit
34e2783cb1
|
@ -68,7 +68,12 @@ func addGiteaEndpoint(r *gin.Engine) {
|
|||
func Serve(c *cli.Context) error {
|
||||
fmt.Println("Hi! I'm the Gitea-SonarQube-PR bot. At your service.")
|
||||
|
||||
r := gin.Default()
|
||||
r := gin.New()
|
||||
|
||||
r.Use(gin.Recovery())
|
||||
r.Use(gin.LoggerWithConfig(gin.LoggerConfig{
|
||||
SkipPaths: []string{"/ping", "/favicon.ico"},
|
||||
}))
|
||||
|
||||
addPingApi(r)
|
||||
addSonarQubeEndpoint(r)
|
||||
|
|
Loading…
Reference in a new issue