Skip to content

Commit

Permalink
Update for CakePHP 3.6.*
Browse files Browse the repository at this point in the history
  • Loading branch information
suhaboncukcu committed May 9, 2018
1 parent eee36b0 commit 35b7624
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Middleware/LoggerMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public function __invoke($request, $response, $next)
$message = json_encode($messageLoad);

//drop current logs.
$debug = Log::config('debug');
$error = Log::config('error');
$debug = Log::setConfig('debug');
$error = Log::setConfig('error');
Log::drop('debug');
Log::drop('error');

Expand All @@ -75,8 +75,8 @@ public function __invoke($request, $response, $next)
]);

//reset default logs.
Log::config('debug', $debug);
Log::config('error', $error);
Log::setConfig('debug', $debug);
Log::setConfig('error', $error);

return $response;
}
Expand Down

0 comments on commit 35b7624

Please sign in to comment.