diff --git a/plaso/cli/status_view.py b/plaso/cli/status_view.py index 6357efbe1d..e26d6772ca 100644 --- a/plaso/cli/status_view.py +++ b/plaso/cli/status_view.py @@ -253,8 +253,9 @@ def _GetPathSpecificationString(self, path_spec): Returns: str: printable string representation of the path specification. """ - return path_spec.comparable.translate( - definitions.NON_PRINTABLE_CHARACTER_TRANSLATION_TABLE) + return '\n'.join([ + line.translate(definitions.NON_PRINTABLE_CHARACTER_TRANSLATION_TABLE) + for line in path_spec.comparable.split('\n')]) def _PrintAnalysisStatusUpdateFile(self, processing_status): """Prints an analysis status update in file mode. diff --git a/plaso/cli/tools.py b/plaso/cli/tools.py index ec1b19c3d2..758d38e3bc 100644 --- a/plaso/cli/tools.py +++ b/plaso/cli/tools.py @@ -152,8 +152,9 @@ def _GetPathSpecificationString(self, path_spec): if not path_spec: return 'N/A' - return path_spec.comparable.translate( - definitions.NON_PRINTABLE_CHARACTER_TRANSLATION_TABLE) + return '\n'.join([ + line.translate(definitions.NON_PRINTABLE_CHARACTER_TRANSLATION_TABLE) + for line in path_spec.comparable.split('\n')]) def _ParseInformationalOptions(self, options): """Parses the informational options. diff --git a/plaso/engine/extractors.py b/plaso/engine/extractors.py index 5509b68128..e0e157b578 100644 --- a/plaso/engine/extractors.py +++ b/plaso/engine/extractors.py @@ -490,8 +490,9 @@ def _GetPathSpecificationString(self, path_spec): Returns: str: printable string representation of the path specification. """ - return path_spec.comparable.translate( - definitions.NON_PRINTABLE_CHARACTER_TRANSLATION_TABLE) + return '\n'.join([ + line.translate(definitions.NON_PRINTABLE_CHARACTER_TRANSLATION_TABLE) + for line in path_spec.comparable.split('\n')]) def ExtractPathSpecs( self, path_spec, find_specs=None, recurse_file_system=True, diff --git a/plaso/multi_process/extraction_engine.py b/plaso/multi_process/extraction_engine.py index 7cdaa10fce..4926370410 100644 --- a/plaso/multi_process/extraction_engine.py +++ b/plaso/multi_process/extraction_engine.py @@ -363,8 +363,9 @@ def _GetPathSpecificationString(self, path_spec): Returns: str: printable string representation of the path specification. """ - return path_spec.comparable.translate( - definitions.NON_PRINTABLE_CHARACTER_TRANSLATION_TABLE) + return ', '.join([ + line.translate(definitions.NON_PRINTABLE_CHARACTER_TRANSLATION_TABLE) + for line in path_spec.comparable.split('\n')]) def _MergeAttributeContainer(self, storage_writer, merge_helper, container): """Merges an attribute container from a task store into the storage writer. @@ -708,7 +709,6 @@ def _ProcessEventSources(self, storage_writer, session_identifier): else: path_spec_string = self._GetPathSpecificationString(task.path_spec) - path_spec_string = path_spec_string.replace('\n', ' ') logger.debug(( f'Scheduled task: {task.identifier:s} for path specification: ' f'{path_spec_string:s}'))