Skip to content

Commit

Permalink
Add targetd service flag to config (#107)
Browse files Browse the repository at this point in the history
(DIS-2589)
  • Loading branch information
cecinestpasunepipe authored Nov 23, 2023
1 parent 1a82af7 commit e879310
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions acquire/acquire.py
Original file line number Diff line number Diff line change
Expand Up @@ -1795,6 +1795,8 @@ def acquire_target(target: Target, *args, **kwargs) -> list[str]:

def acquire_target_targetd(target: Target, args: argparse.Namespace, output_ts: Optional[str] = None) -> list[str]:
files = []
# debug logs contain references to flow objects and will give errors
logging.getLogger().setLevel(logging.CRITICAL)
if not len(target.hostname()):
log.error("Unable to initialize targetd.")
return files
Expand Down Expand Up @@ -2247,6 +2249,7 @@ def main() -> None:
"address": args.targetd_ip,
"port": args.targetd_port,
"cacert_str": args.targetd_cacert,
"service": args.targetd_func == "agent",
"cacert": None,
}
start_client(args, presets=config)
Expand Down
2 changes: 1 addition & 1 deletion acquire/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def flush_cache(self):
if self._record_cache:
for record in self._record_cache:
logging.FileHandler.emit(self, record)
self._record_cache = None
self._record_cache = []

def emit(self, record):
if not self.opened:
Expand Down

0 comments on commit e879310

Please sign in to comment.