Fixed the logger

This commit is contained in:
Lewis Dale 2023-08-27 21:32:27 +01:00
parent 69d8ec33a5
commit 16e0a8f381
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ class FileLogger extends AbstractLogger
$callingClass = debug_backtrace()[2]['class'];
$callingFunction = debug_backtrace()[2]['function'];
$log = $timestamp->format(DATE_ATOM) . " [$level] $callingClass::$callingFunction $message " . json_encode($context);
fwrite(fopen($this->filename, 'w'), $log . PHP_EOL);
fwrite(fopen($this->filename, 'a'), $log . PHP_EOL);
}
}

View File

@ -39,7 +39,7 @@ class Resizer
$params,
$converted
);
$this->logger->info("Saved image for $path");
$this->logger->info("Saved image", ['path'=>$path, 'params'=>$params]);
header("Content-type: {$original_img->getMime()}");
return base64_decode($converted);