Closed jklue closed 2 years ago
when one uses the janitor helper it will call an callback https://github.com/bnomei/kirby3-janitor/blob/dff1ed317bd393109706de5e5b8471c6e1072a9e/index.php#L168 https://github.com/bnomei/kirby3-janitor/blob/dff1ed317bd393109706de5e5b8471c6e1072a9e/classes/Janitor.php#L178
which has built in support for my monolog plugin or https://github.com/bvdputte/kirby-log https://github.com/bnomei/kirby3-janitor/blob/dff1ed317bd393109706de5e5b8471c6e1072a9e/index.php#L45
but you still have to enable it via a config setting bnomei.janitor.log.enabled => true
https://github.com/bnomei/kirby3-janitor/blob/dff1ed317bd393109706de5e5b8471c6e1072a9e/index.php#L44
if you use a custom class and do stuff there its easier to just call monolog or klog youself.
this is how i use it...
1) enable logging in settings
2) call janitor()->log(...with param...)
in you "jobs" code
Sorry I can't figure out how to write to the logs.