chg: [debugging] logging to a separate file

test_debug
iglocska 2024-03-21 11:31:20 +01:00
parent 77f306eab4
commit 88306ebded
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 1 additions and 1 deletions

View File

@ -568,7 +568,7 @@ class ServerSyncTool
$url = $this->server['Server']['url'] . $url;
$start = microtime(true);
$response = $this->socket->post($url, $data, $request);
debug($response);
file_put_contents(APP . '/tmp/logs/foobar.log', json_encode($response), FILE_APPEND);
$this->log($start, 'POST', $url, $response);
if ($etag && $response->isNotModified()) {
return $response; // if etag was provided and response code is 304, it is valid response