mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
log: improve logging
- add a panic recovery handler
- add logs on unexpected error paths
- use logger's panic method
This commit is contained in:
+2
-2
@@ -2,9 +2,9 @@ package api
|
||||
|
||||
import (
|
||||
"github.com/anuvu/zot/errors"
|
||||
"github.com/anuvu/zot/pkg/log"
|
||||
"github.com/getlantern/deepcopy"
|
||||
dspec "github.com/opencontainers/distribution-spec"
|
||||
"github.com/rs/zerolog"
|
||||
)
|
||||
|
||||
//nolint (gochecknoglobals)
|
||||
@@ -92,7 +92,7 @@ func (c *Config) Sanitize() *Config {
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *Config) Validate(log zerolog.Logger) error {
|
||||
func (c *Config) Validate(log log.Logger) error {
|
||||
// LDAP configuration
|
||||
if c.HTTP.Auth != nil && c.HTTP.Auth.LDAP != nil {
|
||||
l := c.HTTP.Auth.LDAP
|
||||
|
||||
Reference in New Issue
Block a user