Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use target logger in etc-plugin #741

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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)

Check warning on line 73 in dissect/target/plugins/os/unix/etc/etc.py

View check run for this annotation

Codecov / codecov/patch

dissect/target/plugins/os/unix/etc/etc.py#L73

Added line #L73 was not covered by tests
pass
Loading