feat(middlewares): Add stacktrace in recovery log
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Matthieu 'JP' DERASSE
2023-01-15 19:42:39 +00:00
parent 7bd178c462
commit 2259c587e1
6 changed files with 33 additions and 11 deletions

View File

@ -19,7 +19,7 @@ import (
const envPrefix = "LOG_"
// CONFIG_FILE is the default file that will be searched to apply configuration from the filesystem.
const defaultConfigFile = "log.yaml"
const defaultConfigFile = "conf/log.yaml"
// SECRET_NAME is the default name of the secret that will be searched in vault.
const defaultSecretName = "log"

View File

@ -9,9 +9,8 @@ import (
// ConfigStruct is the configuration for GELF Provider.
type ConfigStruct struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
ExtrasFields map[string]interface{} `yaml:"extra_fields"`
Host string `yaml:"host"`
Port int `yaml:"port"`
}
// IsValid will check that the Gelf configuration is valid.

View File

@ -19,7 +19,7 @@ func NewHook(c *ConfigStruct) (logrus.Hook, error) {
hook := graylog.NewAsyncGraylogHook(
fmt.Sprintf("%s:%d", c.Host, c.Port),
c.ExtrasFields,
nil,
)
defer hook.Flush()