提交 76480fce 编写于 作者: S sunby 提交者: yefu.chen

Change default log output to stdout

Signed-off-by: Nsunby <bingyi.sun@zilliz.com>
上级 3c72f09d
...@@ -78,7 +78,7 @@ dataNode: ...@@ -78,7 +78,7 @@ dataNode:
log: log:
level: debug level: debug
file: file:
rootPath: /tmp/milvus rootPath: ""
maxSize: 300 # MB maxSize: 300 # MB
maxAge: 10 # day maxAge: 10 # day
maxBackups: 20 maxBackups: 20
......
...@@ -311,5 +311,9 @@ func (p *ParamTable) initLogCfg() { ...@@ -311,5 +311,9 @@ func (p *ParamTable) initLogCfg() {
if err != nil { if err != nil {
panic(err) panic(err)
} }
p.Log.File.Filename = path.Join(rootPath, "datanode-"+strconv.FormatInt(p.NodeID, 10)+".log") if len(rootPath) != 0 {
p.Log.File.Filename = path.Join(rootPath, "datanode-"+strconv.FormatInt(p.NodeID, 10)+".log")
} else {
p.Log.File.Filename = ""
}
} }
...@@ -237,5 +237,9 @@ func (p *ParamTable) initLogCfg() { ...@@ -237,5 +237,9 @@ func (p *ParamTable) initLogCfg() {
if err != nil { if err != nil {
panic(err) panic(err)
} }
p.Log.File.Filename = path.Join(rootPath, "dataservice-"+strconv.FormatInt(p.NodeID, 10)+".log") if len(rootPath) != 0 {
p.Log.File.Filename = path.Join(rootPath, "dataservice-"+strconv.FormatInt(p.NodeID, 10)+".log")
} else {
p.Log.File.Filename = ""
}
} }
...@@ -203,5 +203,9 @@ func (p *ParamTable) initLogCfg() { ...@@ -203,5 +203,9 @@ func (p *ParamTable) initLogCfg() {
if err != nil { if err != nil {
panic(err) panic(err)
} }
p.Log.File.Filename = path.Join(rootPath, fmt.Sprintf("masterservice-%d.log", p.NodeID)) if len(rootPath) != 0 {
p.Log.File.Filename = path.Join(rootPath, fmt.Sprintf("masterservice-%d.log", p.NodeID))
} else {
p.Log.File.Filename = ""
}
} }
...@@ -469,5 +469,9 @@ func (p *ParamTable) initLogCfg() { ...@@ -469,5 +469,9 @@ func (p *ParamTable) initLogCfg() {
if err != nil { if err != nil {
panic(err) panic(err)
} }
p.Log.File.Filename = path.Join(rootPath, fmt.Sprintf("querynode-%d.log", p.QueryNodeID)) if len(rootPath) != 0 {
p.Log.File.Filename = path.Join(rootPath, fmt.Sprintf("querynode-%d.log", p.QueryNodeID))
} else {
p.Log.File.Filename = ""
}
} }
...@@ -92,7 +92,11 @@ func (p *ParamTable) initLogCfg() { ...@@ -92,7 +92,11 @@ func (p *ParamTable) initLogCfg() {
if err != nil { if err != nil {
panic(err) panic(err)
} }
p.Log.File.Filename = path.Join(rootPath, fmt.Sprintf("queryService-%d.log", p.NodeID)) if len(rootPath) != 0 {
p.Log.File.Filename = path.Join(rootPath, fmt.Sprintf("queryService-%d.log", p.NodeID))
} else {
p.Log.File.Filename = ""
}
} }
func (p *ParamTable) initStatsChannelName() { func (p *ParamTable) initStatsChannelName() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册