Allow most parts of Vault's logging to have its level changed on-the-fly (#5280)

* Allow most parts of Vault's logging to have its level changed on-the-fly

* Use a const for not set
This commit is contained in:
Jeff Mitchell
2018-09-05 15:52:54 -04:00
committed by GitHub
parent 80272dfe07
commit d3edc47096
15 changed files with 177 additions and 34 deletions

View File

@@ -53,6 +53,8 @@ type Config struct {
PluginDirectory string `hcl:"plugin_directory"`
LogLevel string `hcl:"log_level"`
PidFile string `hcl:"pid_file"`
EnableRawEndpoint bool `hcl:"-"`
EnableRawEndpointRaw interface{} `hcl:"raw_storage_endpoint"`
@@ -299,6 +301,11 @@ func (c *Config) Merge(c2 *Config) *Config {
result.DefaultMaxRequestDuration = c2.DefaultMaxRequestDuration
}
result.LogLevel = c.LogLevel
if c2.LogLevel != "" {
result.LogLevel = c2.LogLevel
}
result.ClusterName = c.ClusterName
if c2.ClusterName != "" {
result.ClusterName = c2.ClusterName