mirror of https://github.com/milvus-io/milvus.git
Make Etcd log level configurable. (#15737)
Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>pull/15753/head
parent
a05df77e96
commit
cdcb3627b4
|
@ -21,6 +21,10 @@ etcd:
|
|||
rootPath: by-dev # The root path where data is stored in etcd
|
||||
metaSubPath: meta # metaRootPath = rootPath + '/' + metaSubPath
|
||||
kvSubPath: kv # kvRootPath = rootPath + '/' + kvSubPath
|
||||
log:
|
||||
level: info # Only supports debug, info, warn, error, panic, or fatal. Default 'info'.
|
||||
use:
|
||||
embed: false # Whether to enable embedded Etcd (an in-process EtcdServer).
|
||||
|
||||
# Related configuration of minio, which is responsible for data persistence for Milvus.
|
||||
minio:
|
||||
|
@ -203,7 +207,7 @@ localStorage:
|
|||
|
||||
# Configures the system log output.
|
||||
log:
|
||||
level: debug # info, warn, error, panic, fatal
|
||||
level: info # Only supports debug, info, warn, error, panic, or fatal. Default 'info'.
|
||||
file:
|
||||
rootPath: "" # default to stdout, stderr
|
||||
maxSize: 300 # MB
|
||||
|
|
|
@ -46,6 +46,7 @@ func InitEtcdServer(etcdCfg *paramtable.EtcdConfig) error {
|
|||
cfg = embed.NewConfig()
|
||||
}
|
||||
cfg.Dir = etcdCfg.DataDir
|
||||
cfg.LogLevel = etcdCfg.EtcdLogLevel
|
||||
e, err := embed.StartEtcd(cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -28,6 +28,7 @@ import (
|
|||
const (
|
||||
// SuggestPulsarMaxMessageSize defines the maximum size of Pulsar message.
|
||||
SuggestPulsarMaxMessageSize = 5 * 1024 * 1024
|
||||
defaultEtcdLogLevel = "info"
|
||||
)
|
||||
|
||||
// ServiceParam is used to quickly and easily access all basic service configurations.
|
||||
|
@ -58,6 +59,7 @@ type EtcdConfig struct {
|
|||
Endpoints []string
|
||||
MetaRootPath string
|
||||
KvRootPath string
|
||||
EtcdLogLevel string
|
||||
|
||||
// --- Embed ETCD ---
|
||||
UseEmbedEtcd bool
|
||||
|
@ -80,6 +82,7 @@ func (p *EtcdConfig) LoadCfgToMemory() {
|
|||
}
|
||||
p.initMetaRootPath()
|
||||
p.initKvRootPath()
|
||||
p.initEtcdLogLevel()
|
||||
}
|
||||
|
||||
func (p *EtcdConfig) initUseEmbedEtcd() {
|
||||
|
@ -131,6 +134,10 @@ func (p *EtcdConfig) initKvRootPath() {
|
|||
p.KvRootPath = path.Join(rootPath, subPath)
|
||||
}
|
||||
|
||||
func (p *EtcdConfig) initEtcdLogLevel() {
|
||||
p.EtcdLogLevel = p.Base.LoadWithDefault("etcd.log.level", defaultEtcdLogLevel)
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// --- pulsar ---
|
||||
type PulsarConfig struct {
|
||||
|
|
Loading…
Reference in New Issue