Skip to content

Adding logpath to data plugins collector - #286

Merged
graepaul merged 3 commits into
developmentfrom
bugfix/log_path_not_passed_to_collectors
Sep 17, 2026
Merged

graepaul merged 3 commits into
developmentfrom
bugfix/log_path_not_passed_to_collectors

Conversation

@graepaul

@graepaul graepaul commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR is mainly to fix nodescraper/interfaces/dataplugin.py so that when a collector class is instantiated we create its folder and give it the log_path.

Log Path Collector

Now we create a collectors path by creating the plugin's and collector's folder.

                    collector_log_path = None
                    if self.log_path:
                        _log_path = (
                            Path(self.log_path)
                            / resolve_log_dir_name(self.__class__.__name__)
                            / resolve_log_dir_name(collector_cls.__name__)
                        )
                        _log_path.mkdir(parents=True, exist_ok=True)
                        collector_log_path = str(_log_path)

This is then passed into the collector class

                    collection_task: DataCollector[Any, Any, Any] = collector_cls(
                        system_info=self.system_info.model_copy(),
                        logger=self.logger,
                        system_interaction_level=system_interaction_level,
                        connection=self.connection_manager.connection,
                        max_event_priority_level=max_event_priority_level,
                        parent=self.__class__.__name__,
                        task_result_hooks=self.task_result_hooks,
                        log_path=collector_log_path,
                        event_reporter=self.event_reporter,
                        session_id=self.session_id,
                    )

Docstring updates

I have updated various docstrings that were missing / out of date.

Test plan

Added new test

Checklist

  • Added/updated tests (or explained why not)
  • Updated docs/README if behavior changed
  • No secrets or credentials committed

@graepaul graepaul left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comments on files to summarize changes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just docstring updates

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just docstring updates

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just docstring updates

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just docstring updates

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just docstring updates + annotation updates

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just docstring updates.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring / annotation updates only

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring / annotation updates only

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring updates only

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring updates only

@graepaul
graepaul merged commit fd0386f into development Sep 17, 2026
7 checks passed
@graepaul
graepaul deleted the bugfix/log_path_not_passed_to_collectors branch September 17, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants