Skip to content

Commit

Permalink
Use target logger in etc-plugin (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
cecinestpasunepipe committed Jul 5, 2024
1 parent a70c8a3 commit 8bf15d7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions dissect/target/plugins/os/unix/etc/etc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import fnmatch
import logging
import re
from pathlib import Path
from typing import Iterator
Expand All @@ -22,8 +21,6 @@
],
)

log = logging.getLogger(__name__)


class EtcTree(ConfigurationTreePlugin):
__namespace__ = "etc"
Expand Down Expand Up @@ -73,5 +70,5 @@ def etc(self, pattern: str) -> Iterator[UnixConfigTreeRecord]:
if isinstance(config_object, ConfigurationEntry):
yield from self._sub(config_object, Path(entry) / Path(item), pattern)
except Exception:
log.warning("Could not open configuration item: %s", item)
self.target.log.warning("Could not open configuration item: %s", item)
pass

0 comments on commit 8bf15d7

Please sign in to comment.