Agent: Change exceptions' log level to warning in IPScanner

This commit is contained in:
Shreya Malviya 2022-04-07 14:04:30 +05:30
parent e3fc5cf5e5
commit 58d4c33959
1 changed files with 3 additions and 3 deletions

View File

@ -64,13 +64,13 @@ class IPScanner:
try:
ping_scan_data = self._puppet.ping(address.ip, icmp_timeout)
except Exception as ex:
logger.debug(f"Exception encountered when pinging {address.ip}: {str(ex)}")
logger.warning(f"Exception encountered when pinging {address.ip}: {str(ex)}")
ping_scan_data = PingScanData(False, None)
try:
port_scan_data = self._puppet.scan_tcp_ports(address.ip, tcp_ports, tcp_timeout)
except Exception as ex:
logger.debug(
logger.warning(
f"Exception encountered when scanning TCP ports on {address.ip}: {str(ex)}"
)
port_scan_data = {-1: PortScanData(-1, PortStatus.CLOSED, None, None)}
@ -83,7 +83,7 @@ class IPScanner:
address.ip, fingerprinters, ping_scan_data, port_scan_data, stop
)
except Exception as ex:
logger.debug(
logger.warning(
f"Exception encountered running fingerprinters on {address.ip}: "
f"{str(ex)}"
)