mirror of
https://github.com/getgrav/grav.git
synced 2026-02-08 23:57:39 +01:00
Add date/time to text file output of scheduler
This commit is contained in:
@@ -390,7 +390,9 @@ class Job
|
||||
if (count($this->outputTo) > 0) {
|
||||
foreach ($this->outputTo as $file) {
|
||||
$output_mode = $this->outputMode === 'append' ? FILE_APPEND | LOCK_EX : LOCK_EX;
|
||||
file_put_contents($file, $this->output, $output_mode);
|
||||
$timestamp = (new DateTime('now'))->format('c');
|
||||
$output = $timestamp . "\n" . str_pad('', strlen($timestamp), '>') . "\n" . $this->output;
|
||||
file_put_contents($file, $output, $output_mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user