joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[4.1] Use an injected logger in the Task driver

Open ditsuke opened this issue 3 years ago • 1 comments

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

-

ditsuke avatar Dec 27 '21 15:12 ditsuke

This pull request has automatically rebased to 4.2-dev.

HLeithner avatar Jun 27 '22 13:06 HLeithner

@ditsuke can you implement the the suggestions and fix the conflicts?

laoneo avatar Oct 21 '22 14:10 laoneo

This pull request has been automatically rebased to 5.0-dev.

HLeithner avatar May 02 '23 16:05 HLeithner

This pull request has been automatically rebased to 5.1-dev.

HLeithner avatar Sep 30 '23 22:09 HLeithner

This pull request has been automatically rebased to 5.2-dev.

HLeithner avatar Apr 24 '24 09:04 HLeithner