Download the PHP package contaoblackforest/contao-logger without Composer
On this page you can find all versions of the php package contaoblackforest/contao-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download contaoblackforest/contao-logger
More information about contaoblackforest/contao-logger
Files in contaoblackforest/contao-logger
Package contao-logger
Short Description PSR-3 logger bridge for Contao Open Source CMS
License LGPL-3.0+
Informations about the package contao-logger
Logger bridge for Contao Open Source CMS
This bridge provide PSR-3 logger support for Contao Open Source CMS. The logger is available via the dependency injection container.
By default the logger use two handlers.
- An contao syslog handler, that write log entries to the system log database.
- And an stream handler, that write log entries to
system/logs/contao.log
.
By default it use Monolog as implementation, but it is designed to be replaceable with any PSR-3 compatible logger implementation.
Access and use the logger
Logger configuration
Receive and change the default log level
Define default log handlers
The default log handlers are stored in $container['logger.default.handlers']
containing a list of handler services.
Create your own logger
Reference
Services
$container['logger.default.level']
(int
) the default log level, default: Psr\Log\LogLevel::INFO
$container['logger.default.level.contao']
(int
) the default log level, inherited from $container['logger.default.level']
$container['logger.default.level.buffer']
(int
) the default log level, inherited from $container['logger.default.level']
$container['logger.default.level.chromePhp']
(int
) the default log level, inherited from $container['logger.default.level']
$container['logger.default.level.firePhp']
(int
) the default log level, inherited from $container['logger.default.level']
$container['logger.default.level.rotatingFile']
(int
) the default log level, inherited from $container['logger.default.level']
$container['logger.default.level.mail']
(int
) the default log level, default: Psr\Log\LogLevel::ERROR
$container['logger.default.level.stream']
(int
) the default log level, inherited from $container['logger.default.level']
$container['logger.default.rotation']
(int
) number of days for log rotation, default: 28
$container['logger.handler.contao']
(Monolog\Handler\HandlerInterface|Logger\ContaoHandler
) default contao syslog handler
$container['logger.handler.stream']
(Monolog\Handler\HandlerInterface|Monolog\Handler\RotatingFileHandler
) default rotating logfile (system/logs/contao-Y-m-d.log) handler
$container['logger.default.handlers']
(ArrayObject
) list of default log handlers
$container['logger']
(Psr\Log\LoggerInterface|Monolog\Logger
) the default logger
Factories
$container['logger.factory.handler.contao']
$container['logger.factory.handler.buffer']
$container['logger.factory.handler.chromePhp']
$container['logger.factory.handler.fingersCrossed']
$container['logger.factory.handler.firePhp']
$container['logger.factory.handler.group']
$container['logger.factory.handler.rotatingFile']
$container['logger.factory.handler.mail']
$container['logger.factory.handler.stream']
$container['logger.factory']
All versions of contao-logger with dependencies
contao/core Version >=2.11.11,<4-dev
contao-community-alliance/composer-plugin Version ~2.0
contao-community-alliance/dependency-container Version ~1.0
psr/log Version ~1.0
monolog/monolog Version ~1.5