diff --git a/CHANGELOG.md b/CHANGELOG.md index bacbd59..38cf3d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,36 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.3.0] - 2021-03-02 + +### Fixed + +- fix missing static methods + +### Added + +- add configurable FirePHP handler + +--- + +## [1.2.2] - 2021-01-23 + +### Changed + +- change static methods to non-static methods for better testable code +- change line endings for easy patching + +### Added + +- add prepared statement generator + +--- + +## [1.2.1] - 2020-05-01 + +### Fixed + +- add missing autoload file item in composer.json --- diff --git a/README.md b/README.md index 65c88de..c751948 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,33 @@ CLI: ![Example CLI](https://raw.githubusercontent.com/d3datadevelopment/oxid-sql-logger/master/img/screenshot-cli.jpg) +## Configuration + +Add the sections to the config.inc.php of the shop if needed: + +```php +$this->SqlLoggerGUIHandlers = [ + \Monolog\Handler\BrowserConsoleHandler::class, + \D3\OxidSqlLogger\Handler\d3FirePHPHandler::class +]; +``` + +Standard handlers are BrowserConsoleHandler and d3FirePHPHandler. + +```php +$this->SqlLoggerCLIHandlers = [ + ... +]; +``` + +Standard handler is StreamHandler. + +```php +$this->d3FirePHPOptions = [ + \D3\OxidSqlLogger\Handler\d3FirePHPHandler::ADD_TRACE +]; +``` + ## Credits Many thanks to [Tobias Matthaiou](https://github.com/TumTum/oxid-sql-logger) for his inspiration. diff --git a/src/LoggerFactory.php b/src/LoggerFactory.php index 4d2a5e2..e9b763f 100644 --- a/src/LoggerFactory.php +++ b/src/LoggerFactory.php @@ -35,7 +35,9 @@ class LoggerFactory $handlers = (isset($configuredHandlers) && $this->is_iterable($configuredHandlers)) ? $this->getInstancesFromHandlerList($configuredHandlers) : - [$this->getStreamHandler()]; + [ + $this->getStreamHandler() + ]; } else { $configuredHandlers = Registry::getConfig()->getConfigParam('SqlLoggerGUIHandlers');