diff --git a/configs/milvus.yaml b/configs/milvus.yaml index d81e61f0923dadd162a527fed3e97b7e9f3d888a..7c47b8f3f9d474a7b6b67e52fe8bf676b307196e 100644 --- a/configs/milvus.yaml +++ b/configs/milvus.yaml @@ -78,7 +78,7 @@ dataNode: log: level: debug file: - rootPath: /tmp/milvus + rootPath: "" maxSize: 300 # MB maxAge: 10 # day maxBackups: 20 diff --git a/internal/datanode/param_table.go b/internal/datanode/param_table.go index 5a2c71a4a42ed56b655c8c1d063be263efe836b4..298fcdcd5a96b167805a5f4f46c0949ae3da1df6 100644 --- a/internal/datanode/param_table.go +++ b/internal/datanode/param_table.go @@ -311,5 +311,9 @@ func (p *ParamTable) initLogCfg() { if err != nil { 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 = "" + } } diff --git a/internal/dataservice/param.go b/internal/dataservice/param.go index 2d451130322f574a6712bfb34c02e30bd359b89c..15f7c2d44960ef28bb6b2442c2f9603a7de06876 100644 --- a/internal/dataservice/param.go +++ b/internal/dataservice/param.go @@ -237,5 +237,9 @@ func (p *ParamTable) initLogCfg() { if err != nil { 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 = "" + } } diff --git a/internal/masterservice/param_table.go b/internal/masterservice/param_table.go index bc3ee0307f1c0b36284b43cef0d5392821c98709..93c20a95c6faeec00f1f21df4d8aee299a89235c 100644 --- a/internal/masterservice/param_table.go +++ b/internal/masterservice/param_table.go @@ -203,5 +203,9 @@ func (p *ParamTable) initLogCfg() { if err != nil { 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 = "" + } } diff --git a/internal/querynode/param_table.go b/internal/querynode/param_table.go index 0deba81600a66560455c917aca70bf315edf6262..77c89dcc443b97c42d5cfa9b31d2db66210352e0 100644 --- a/internal/querynode/param_table.go +++ b/internal/querynode/param_table.go @@ -469,5 +469,9 @@ func (p *ParamTable) initLogCfg() { if err != nil { 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 = "" + } } diff --git a/internal/queryservice/param_table.go b/internal/queryservice/param_table.go index 9622926660e2ab2f312d138f7c51c6028c3cc4d3..7b737db3d5102c0ad5690b7b6e690ef57950fcab 100644 --- a/internal/queryservice/param_table.go +++ b/internal/queryservice/param_table.go @@ -92,7 +92,11 @@ func (p *ParamTable) initLogCfg() { if err != nil { 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() {