Download the PHP package seyfer/zend-psr-logger without Composer
On this page you can find all versions of the php package seyfer/zend-psr-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download seyfer/zend-psr-logger
More information about seyfer/zend-psr-logger
Files in seyfer/zend-psr-logger
Package zend-psr-logger
Short Description Base module for custom loggers. This is module that implement PSR-3 log interface with use Zend\Log component. Also implement Doctrine log writer.
License GPL-3.0-or-later
Homepage http://seyferseed.ru
Informations about the package zend-psr-logger
ZendPsrLogger
This is module that implement PSR-3 log interface with Zend\log component. Also implement Doctrine log writer.
Installation
Get from packagist or github.
require "seyfer/zend-psr-logger": "dev-master"
http://modules.zendframework.com/seyfer/ZendPsrLogger
If using Zend2, than enable in application.config.php, add 'ZendPsrLogger' to modules.
Configuration
Extra column mapping and Entity name in module.config.php.
Extra column ipaddress
for example.
Than set abstract factory with your module logger custom name in Module.php
Factory will use your module.config.php logger
config.
You can implement your factory and using writers,
that implement Zend\Log\Writer\AbstractWriter.
To implement your Doctrine log entity you can extend it from
Logger\Entity\BaseLog
and just add your extra column mapping.
And than register your logger in your Module and add config like in example.
Usage
First init logger
Than use it's level function
Or log directly using \Psr\Log\LogLevel constants for level parameter.
License
GPL. If you want implement more writers or other improvements - you're welcome!
Change Log
v1.1.0
- use AbstractLoggerFactory and new config structure for multiple logger creation
v1.0.1
- implement Doctrine writer
- use LoggerFactory for logger creation
All versions of zend-psr-logger with dependencies
zendframework/zendframework Version ~2.5
doctrine/common Version >=2.4
doctrine/orm Version >=2.4
doctrine/doctrine-module Version >=0.8
doctrine/doctrine-orm-module Version >=0.8
psr/log Version 1.0.*@dev