/
var
/
www
/
html
/
sugar9
/
src
/
Dbal
/
Logging
/
Upload File
HOME
<?php /* * Your installation or use of this SugarCRM file is subject to the applicable * terms available at * http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/. * If you do not agree to all of the applicable terms or do not have the * authority to bind the entity as an authorized representative, then do not * install or use this SugarCRM file. * * Copyright (C) SugarCRM Inc. All rights reserved. */ namespace Sugarcrm\Sugarcrm\Dbal\Logging; use Doctrine\DBAL\Logging\SQLLogger; use Psr\Log\LoggerInterface; /** * Logs every query as a debug message */ final class DebugLogger implements SQLLogger { /** * @var LoggerInterface */ protected $logger; public function __construct(LoggerInterface $logger) { $this->logger = $logger; } /** * {@inheritDoc} */ public function startQuery($sql, array $params = null, array $types = null) { $this->logger->info('Query: ' . $sql, [ 'params' => $params, 'types' => $types, ]); } /** * {@inheritDoc} */ public function stopQuery() { } }