Skip to content

Commit

Permalink
enhancement(#5229): logger fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pro-akim committed Apr 18, 2024
1 parent 2c925fa commit 8aa767e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions deployability/modules/testing/tests/helpers/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .constants import WAZUH_CONF, WAZUH_ROOT
from .executor import Executor, WazuhAPI
from .generic import HostInformation, CheckFiles
from .logger.logger import logger
from modules.generic.logger import logger

class WazuhAgent:

Expand Down Expand Up @@ -199,9 +199,10 @@ def perform_action_and_scan(agent_params, action_callback) -> dict:
"""
result = CheckFiles.perform_action_and_scan(agent_params, action_callback)
os_name = HostInformation.get_os_name_from_inventory(agent_params)
os_type = HostInformation.get_os_type(agent_params)
logger.info(f'Applying filters in checkfiles in {HostInformation.get_os_name_and_version_from_inventory(agent_params)}')

if 'linux' == HostInformation.get_os_type(agent_params):
if os_type == 'linux':
if 'debian' in os_name:
filter_data = {
'/boot': {'added': [], 'removed': [], 'modified': ['grubenv']},
Expand Down Expand Up @@ -237,7 +238,7 @@ def perform_action_and_scan(agent_params, action_callback) -> dict:
'/root': {'added': ['trustdb.gpg', 'lesshst'], 'removed': [], 'modified': []},
'/usr/sbin': {'added': [], 'removed': [], 'modified': []}
}
elif 'macos' == HostInformation.get_os_type(agent_params):
elif os_type == 'macos':
filter_data = {
'/usr/bin': {'added': [], 'removed': [], 'modified': []},
'/usr/sbin': {'added': [], 'removed': [], 'modified': []}
Expand Down
2 changes: 1 addition & 1 deletion deployability/modules/testing/tests/helpers/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .constants import CLUSTER_CONTROL, AGENT_CONTROL, WAZUH_CONF, WAZUH_ROOT
from .executor import Executor, WazuhAPI
from .generic import HostInformation, CheckFiles
from .logger.logger import logger
from modules.generic.logger import logger
from .utils import Utils


Expand Down
2 changes: 1 addition & 1 deletion deployability/modules/testing/tests/helpers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import logging
import time

from .logger.logger import logger
from modules.generic.logger import logger


paramiko_logger = logging.getLogger("paramiko")
Expand Down

0 comments on commit 8aa767e

Please sign in to comment.