~goorzhel/sota-slack-spotter

29214c874d83cdf5c170f62e8025f86dab9145f3 — Antonio Gurgel 2 months ago 1c0f4f5
main: Log errors using Display impl again

By now all errors should print complete error chains on one line.
1 files changed, 3 insertions(+), 3 deletions(-)

M src/main.rs
M src/main.rs => src/main.rs +3 -3
@@ 74,7 74,7 @@ async fn main() -> Result<()> {
            match fetch_callsigns(&slack, &mut callsigns) {
                Ok(count) => callsign_gauge.set(count.try_into().unwrap()),
                Err(e) => {
                    error!("Error while fetching callsigns: {:?}", e);
                    error!("Error while fetching callsigns: {}", e);
                    let ec = errors_counter.lock().unwrap();
                    ec.with_label_values(&["callsigns"]).inc();
                }


@@ 93,7 93,7 @@ async fn main() -> Result<()> {
            match process_spots(&slack_clone, &callsigns, &mut activations, &mut spots) {
                Ok(c) => spots_counter.inc_by(c.try_into().unwrap()),
                Err(e) => {
                    error!("Error while processing spots: {:?}", e);
                    error!("Error while processing spots: {}", e);
                    let ec = errors_counter_clone.lock().unwrap();
                    ec.with_label_values(&["spots"]).inc();
                }


@@ 101,7 101,7 @@ async fn main() -> Result<()> {
            match process_alerts(&slack_clone, &callsigns, &mut alerts) {
                Ok(c) => alerts_counter.inc_by(c.try_into().unwrap()),
                Err(e) => {
                    error!("Error while processing alerts: {:?}", e);
                    error!("Error while processing alerts: {}", e);
                    let ec = errors_counter_clone.lock().unwrap();
                    ec.with_label_values(&["alerts"]).inc();
                }