[tor-commits] [tor/master] relay: Don't log at warn level when we find an address

nickm at torproject.org nickm at torproject.org
Mon Jul 20 20:50:41 UTC 2020


commit a576f37cfeff9f6b0a13a9475b5eed424ee44db9
Author: David Goulet <dgoulet at torproject.org>
Date:   Mon Jul 20 10:58:54 2020 -0400

    relay: Don't log at warn level when we find an address
    
    Dirauth code use the warn log severity when calling find_my_address() which
    made it that every time we would find an address, it would log a warning.
    
    These are not needed below info level and thus set them to info level. An IP
    change is set to notice by default.
    
    Signed-off-by: David Goulet <dgoulet at torproject.org>
---
 src/app/config/resolve_addr.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/app/config/resolve_addr.c b/src/app/config/resolve_addr.c
index df9af231bf..ba1c854d77 100644
--- a/src/app/config/resolve_addr.c
+++ b/src/app/config/resolve_addr.c
@@ -287,8 +287,8 @@ get_address_from_config(const or_options_t *options, int warn_severity,
   }
 
   /* Address can be used. We are done. */
-  log_fn(warn_severity, LD_CONFIG, "Address found in configuration: %s",
-         fmt_addr(addr_out));
+  log_info(LD_CONFIG, "Address found in configuration: %s",
+           fmt_addr(addr_out));
   return FN_RET_OK;
 }
 
@@ -350,8 +350,8 @@ get_address_from_hostname(const or_options_t *options, int warn_severity,
   *hostname_out = tor_strdup(hostname);
 
   /* Found it! */
-  log_fn(warn_severity, LD_CONFIG, "Address found from local hostname: %s",
-         fmt_addr(addr_out));
+  log_info(LD_CONFIG, "Address found from local hostname: %s",
+           fmt_addr(addr_out));
   return FN_RET_OK;
 }
 
@@ -402,8 +402,7 @@ get_address_from_interface(const or_options_t *options, int warn_severity,
   *method_out = "INTERFACE";
 
   /* Found it! */
-  log_fn(warn_severity, LD_CONFIG, "Address found from interface: %s",
-         fmt_addr(addr_out));
+  log_info(LD_CONFIG, "Address found from interface: %s", fmt_addr(addr_out));
   return FN_RET_OK;
 }
 





More information about the tor-commits mailing list