logger: use eprintln! if the logger is not initialized
ref
@@ -2829,17 +2829,17 @@ impl TiKvConfig {
let default_tikv_cfg = TiKvConfig::default();
let default_log_cfg = LogConfig::default();
if self.log_level != default_tikv_cfg.log_level {
- println!("deprecated configuration, log-level has been moved to log.level");
+ eprintln!("deprecated configuration, log-level has been moved to log.level");
if self.log.level == default_log_cfg.level {
- println!("override log.level with log-level, {:?}", self.log_level);
+ eprintln!("override log.level with log-level, {:?}", self.log_level);
self.log.level = self.log_level;
}
self.log_level = default_tikv_cfg.log_level;
}
if self.log_file != default_tikv_cfg.log_file {
- println!("deprecated configuration, log-file has been moved to log.file.filename");
+ eprintln!("deprecated configuration, log-file has been moved to log.file.filename");
if self.log.file.filename == default_log_cfg.file.filename {
- println!(
+ eprintln!(
"override log.file.filename with log-file, {:?}",
self.log_file
);
@@ -2848,25 +2848,25 @@ impl TiKvConfig {
self.log_file = default_tikv_cfg.log_file;
}
if self.log_format != default_tikv_cfg.log_format {
- println!("deprecated configuration, log-format has been moved to log.format");
+ eprintln!("deprecated configuration, log-format has been moved to log.format");
if self.log.format == default_log_cfg.format {
- println!("override log.format with log-format, {:?}", self.log_format);
+ eprintln!("override log.format with log-format, {:?}", self.log_format);
self.log.format = self.log_format;
}
self.log_format = default_tikv_cfg.log_format;
}
if self.log_rotation_timespan.as_secs() > 0 {
- println!(
+ eprintln!(
"deprecated configuration, log-rotation-timespan is no longer used and ignored."
);
}
if self.log_rotation_size != default_tikv_cfg.log_rotation_size {
- println!(
+ eprintln!(
"deprecated configuration, \
log-ratation-size has been moved to log.file.max-size"
);
if self.log.file.max_size == default_log_cfg.file.max_size {
- println!(
+ eprintln!(
"override log.file.max_size with log-rotation-size, {:?}",
self.log_rotation_size
);
