silverstripe-crontask
silverstripe-crontask copied to clipboard
Add LoggerInterface argument to process.
It would be nice if the process()
method could be passed a Psr\Log\LoggerInterface
object for it to send it status output to.
That way, process implementors can provide a range of output at debug, info, and notice level and the logger can decide what to do.
Coupled to this, I would suggest that the dev/cron
action has a suitable logger injected into it, and perhaps defaults to a logger that dumps notice-and-above level errors to stdout. Making monolog a composer dependency might be the easiest solution for that. (Requiring monolog ~1.11
will ensure that you get a PSR-3 complaint version).
This would need to be a major version bump of the crontask module as it would change its interface.
It would probably make sense to bundle this in with the any SS4 compact changes still to be made and released
@sminnee do you think we should do this before tagging 2.0.0 stable (SS4 compatible)?
@sminnee do you think we should do this before tagging 2.0.0 stable (SS4 compatible)?
please :)
Interesting idea but it's an old issue that we're not going to do anything with any time soon. Closing. If someone is keen for this and wants to put in the work to implement it, @
me and we can revisit.