Back to Spacedrive

Job-Specific File Logging

.tasks/core/JOB-002-job-logging.md

0.4.3839 B
Original Source

Description

A dedicated logging system for jobs will be implemented. When enabled, each job writes its detailed operational logs, including progress and debug messages, to a unique log file.

Implementation Notes

  • The logging logic will be implemented in src/infrastructure/jobs/logger.rs.
  • Configuration is managed via JobLoggingConfig in src/config/app_config.rs.
  • The JobExecutor creates a FileJobLogger instance for each job it runs, passing it down through the JobContext.
  • Log files are stored in the job_logs directory within the library path.

Acceptance Criteria

  • When enabled in the config, running a job creates a corresponding .log file.
  • Progress, info, and error messages from the job context are written to the file.
  • The logger respects the include_debug configuration flag.