feat(middlewares): Add stacktrace in recovery log
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -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"
|
||||
|
@ -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.
|
||||
|
@ -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()
|
||||
|
Reference in New Issue
Block a user