Add RootPath field back (#20488)

Signed-off-by: yah01 <yang.cen@zilliz.com>

Signed-off-by: yah01 <yang.cen@zilliz.com>
This commit is contained in:
yah01 2022-11-10 19:43:03 +08:00 committed by GitHub
parent 7537dbfa37
commit 663bdf3399
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,8 @@ const (
// FileLogConfig serializes file log related config in toml/json.
type FileLogConfig struct {
// Log rootpath
RootPath string `toml:"rootpath" json:"rootpath"`
// Log filename, leave empty to disable file log.
Filename string `toml:"filename" json:"filename"`
// Max size for a single file, in MB.

View File

@ -162,6 +162,7 @@ func SetupLogger(cfg *log.Config) {
wrapper := &zapWrapper{logger, logLevel}
grpclog.SetLoggerV2(wrapper)
log.Info("Log directory", zap.String("configDir", cfg.File.RootPath))
log.Info("Set log file to ", zap.String("path", cfg.File.Filename))
})
}