Skip to content

Commit

Permalink
LogLevel PSR
Browse files Browse the repository at this point in the history
  • Loading branch information
lashnev committed Dec 25, 2017
1 parent 5262015 commit bf34cee
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/clients/PostClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
use Psr\Log\LogLevel;

class PostClient implements iClient {

const LOG_LEVEL = LogLevel::INFO;


/** @var string */
protected $url;
/** @var string путь до приватного ключа */
Expand Down Expand Up @@ -78,8 +76,8 @@ public function sendRequest(BaseServiceRequest $service) {
$response = curl_exec($curl);

if($this->logger){
$this->logger->log(self::LOG_LEVEL, 'Requested url '.$requestUrl.' params '. json_encode($requestParameters));
$this->logger->log(self::LOG_LEVEL, 'Response '.$response);
$this->logger->log(LogLevel::INFO, 'Requested url '.$requestUrl.' params '. json_encode($requestParameters));
$this->logger->log(LogLevel::INFO, 'Response '.$response);
}

if(curl_errno($curl)){
Expand Down

0 comments on commit bf34cee

Please sign in to comment.