getPathInfo()); file_put_contents( $basePath . "-body.json", json_encode(json_decode($request->getContent()), JSON_PRETTY_PRINT) ); file_put_contents( $basePath . "-query.json", json_encode($request->query->all(), JSON_PRETTY_PRINT) ); file_put_contents( $basePath . "-header.json", json_encode($request->headers->all(), JSON_PRETTY_PRINT) ); } public static function logResponseToFile(Request $request, Response $response): void { $basePath = dirname(dirname(__DIR__)) . "/.cache/log/" . str_replace("/", "_", $request->getPathInfo()); file_put_contents( $basePath . "-response.json", json_encode(json_decode($response->getContent()), JSON_PRETTY_PRINT) ); } public function emergency($message, array $context = []): void { } public function alert($message, array $context = []): void { } public function critical($message, array $context = []): void { } public function error($message, array $context = []): void { } public function warning($message, array $context = []): void { } public function notice($message, array $context = []): void { } public function info($message, array $context = []): void { } public function debug($message, array $context = []): void { } public function log($level, $message, array $context = []): void { } }