From 618c97942d24b2cce2641a924d58f152e5519608 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Wed, 5 May 2021 10:47:10 +0800 Subject: [PATCH] chore: logging --- src/config.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 9d4b561..20513d4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -96,11 +96,15 @@ impl CertConfig { match item2.fill_dns_names() { Ok(Some(x509_certificate)) => { if x509_certificate.certificate_not_after >= (valid_days_secs + secs_from_unix_epoch) { - information!("Certificate: {} is valid: {} days", item.path, + success!("Certificate: {}, common name: {}, dns names: {:?}, is valid: {} days", item.path, + x509_certificate.common_name, + x509_certificate.alt_names, (x509_certificate.certificate_not_after - secs_from_unix_epoch) / secs_per_day ); } else { - warning!("Certificate: {} is valid: {} days", item.path, + warning!("Certificate: {}, common name: {}, dns names: {:?}, is valid: {} days", item.path, + x509_certificate.common_name, + x509_certificate.alt_names, (x509_certificate.certificate_not_after - secs_from_unix_epoch) / secs_per_day ); filtered_cert_items.push(item2);