Skip to content

Commit

Permalink
use wwarn macro when appropriate
Browse files Browse the repository at this point in the history
wwarn logs a warning as well as writes to stderr
  • Loading branch information
jqnatividad committed Feb 19, 2023
1 parent a12ffc3 commit 99aa360
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/cmd/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ pub fn run(argv: &[&str]) -> CliResult<()> {

if GET_REDIS_RESPONSE.cache_remove(&key).is_err() && log_enabled!(Warn) {
// failure to remove cache keys is non-fatal. Continue, but log it.
warn!(r#"Cannot remove Redis key "{key}""#);
wwarn!(r#"Cannot remove Redis key "{key}""#);
};
}
} else {
Expand Down Expand Up @@ -1139,7 +1139,7 @@ fn get_response(
}

if retries >= flag_max_retries {
warn!("{flag_max_retries} max-retries reached.");
wwarn!("{flag_max_retries} max-retries reached.");
break 'retry;
}
retries += 1;
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/fetchpost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ pub fn run(argv: &[&str]) -> CliResult<()> {

if GET_REDIS_RESPONSE.cache_remove(&key).is_err() && log_enabled!(Warn) {
// failure to remove cache keys is non-fatal. Continue, but log it.
warn!(r#"Cannot remove Redis key "{key}""#);
wwarn!(r#"Cannot remove Redis key "{key}""#);
};
}
} else {
Expand Down Expand Up @@ -1165,7 +1165,7 @@ fn get_response(
}

if retries >= flag_max_retries {
warn!("{flag_max_retries} max-retries reached.");
wwarn!("{flag_max_retries} max-retries reached.");
break 'retry;
}
retries += 1;
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ pub fn infer_schema_from_stats(args: &Args, input_filename: &str) -> CliResult<M
}
}
_ => {
warn!("Stats gave unexpected field type '{col_type}', default to JSON String.");
wwarn!("Stats gave unexpected field type '{col_type}', default to JSON String.");
// defaults to JSON String
type_list.push(Value::String("string".to_string()));
}
Expand Down Expand Up @@ -414,7 +414,7 @@ fn get_stats_records(args: &Args) -> CliResult<(ByteRecord, Vec<Stats>, AHashMap
}
}
Err(e) => {
warn!("error determining if indexed, triggering sequential stats: {e}");
wwarn!("error determining if indexed, triggering sequential stats: {e}");
stats_args.sequential_stats(&stats_args.flag_dates_whitelist)
}
}?;
Expand Down

0 comments on commit 99aa360

Please sign in to comment.