joomla-cms
joomla-cms copied to clipboard
[4.1] Use an injected logger in the Task driver
Summary of Changes
A logger is injected into Task at creation, and into routines through ExecutedTaskEvent at runtime.
Testing Instructions
Tasks should be logged as expected to the scheduler log file "administrator/logs/joomla_scheduler.php". Logs for individual tasks, if enabled, should be saved to the file as specified in the configuration.
Actual result BEFORE applying this Pull Request
No DI, ugly setup code in TaskPluginTrait etc.
Expected result AFTER applying this Pull Request
DI, less static calls (still depends on the global Log instance to setup sub-loggers! :/), more succinct.
Documentation Changes Required
-
This pull request has automatically rebased to 4.2-dev.
@ditsuke can you implement the the suggestions and fix the conflicts?
This pull request has been automatically rebased to 5.0-dev.
This pull request has been automatically rebased to 5.1-dev.
This pull request has been automatically rebased to 5.2-dev.