Skip to content

Commit

Permalink
Removed passing params for logger methods in order to make it PSR-3 c…
Browse files Browse the repository at this point in the history
…ompatible. (#324)
  • Loading branch information
bbankowski authored Oct 20, 2024
1 parent b4f09e7 commit ffe9daa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Ouzo/Core/Db/StatementExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function createPdoStatement(array $options = []): PDOStatement
$sqlString = $this->prepareSqlString();

$callingClass = Backtrace::getCallingClass();
Logger::getLogger(__CLASS__)->info("From: %s Query: %s", [$callingClass, $sqlString]);
Logger::getLogger(__CLASS__)->info("From: {$callingClass} Query: {$sqlString}");

return $this->pdoExecutor->createPDOStatement($this->dbHandle, $this->sql, $this->boundValues, $sqlString, $options);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Ouzo/Core/Middleware/Interceptor/LogRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public function handle(mixed $param, Chain $next): mixed

private function handleRequestContext(RequestContext $requestContext, Chain $next): mixed
{
Logger::getLogger(__CLASS__)->info('[Action: %s#%s] [Request: %s %s]', [
Logger::getLogger(__CLASS__)->info(sprintf('[Action: %s#%s] [Request: %s %s]',
$requestContext->getCurrentController(),
$requestContext->getCurrentAction(),
Uri::getRequestType(),
$this->pathProvider->getPath()
]);
));

return $next->proceed($requestContext);
}
Expand Down

0 comments on commit ffe9daa

Please sign in to comment.