Skip to content

Commit 2c11ae0

Browse files
authored
Merge pull request #53 from cloudstruct/feat/disable-healthcheck-logging
feat: disable /healthcheck access logging
2 parents c794551 + 3db0d75 commit 2c11ae0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/api/api.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
ginSwagger "github.com/swaggo/gin-swagger" // gin-swagger middleware
1717
"golang.org/x/crypto/blake2b"
1818
"io/ioutil"
19+
"time"
1920

2021
_ "github.com/cloudstruct/go-cardano-submit-api/docs" // docs is generated by Swag CLI
2122
)
@@ -44,7 +45,11 @@ func Start(cfg *config.Config) error {
4445
router.Use(gin.Recovery())
4546
// Access logging
4647
accessLogger := logging.GetAccessLogger()
47-
router.Use(ginzap.Ginzap(accessLogger, "", true))
48+
router.Use(ginzap.GinzapWithConfig(accessLogger, &ginzap.Config{
49+
TimeFormat: time.RFC3339,
50+
UTC: true,
51+
SkipPaths: []string{"/healthcheck"},
52+
}))
4853
router.Use(ginzap.RecoveryWithZap(accessLogger, true))
4954
// Standard logging
5055
logger := logging.GetLogger()

0 commit comments

Comments
 (0)