All Projects → enlitepro → enlite-monolog

enlitepro / enlite-monolog

Licence: MIT License
Monolog integration to Laminas

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to enlite-monolog

monolog-telegram-handler
Monolog handler to send log by Telegram
Stars: ✭ 32 (+88.24%)
Mutual labels:  monolog
twbs-helper-module
Laminas (formerly Zend Framework) module for easy integration of Twitter Bootstrap
Stars: ✭ 18 (+5.88%)
Mutual labels:  laminas
DoctrineMongoODMModule
Laminas Module for Doctrine MongoDB ODM
Stars: ✭ 83 (+388.24%)
Mutual labels:  laminas
codeigniter-monolog-plus
codeigniter monolog plus
Stars: ✭ 13 (-23.53%)
Mutual labels:  monolog
app
Buggregator is a beautiful, lightweight debug server build on Laravel that helps you catch your smpt, sentry, var-dump, monolog, ray outputs. It runs without installation on multiple platforms.
Stars: ✭ 259 (+1423.53%)
Mutual labels:  monolog
ErrorHeroModule
💎 A Hero for your Zend Framework/Laminas, and Expressive/Mezzio application to log ( DB and Mail ) and handle php errors & exceptions during Mvc process/between request and response
Stars: ✭ 47 (+176.47%)
Mutual labels:  laminas
SanSessionToolbar
⚡ Session Toolbar that can be applied into Zend/Laminas DeveloperTools
Stars: ✭ 39 (+129.41%)
Mutual labels:  laminas
monolog-http
A collection of monolog handlers that use a PSR-18 HTTP Client to send your logs
Stars: ✭ 34 (+100%)
Mutual labels:  monolog
zf3-circlical-user
Turnkey Authentication, Identity, and RBAC for Laminas and Zend Framework 3. Supports Doctrine and Middleware.
Stars: ✭ 35 (+105.88%)
Mutual labels:  laminas
ApigilityConsumer
🍃 Zend Framework/Laminas and Expressive/Mezzio Apigility/Laminas API Tools Client Module to consume API Services
Stars: ✭ 15 (-11.76%)
Mutual labels:  laminas
zend-di-config
PSR-11 PHP-DI container configurator for Laminas, Mezzio, ZF, Expressive applications or any framework that needs a PSR-11 container
Stars: ✭ 19 (+11.76%)
Mutual labels:  laminas
PHP-Frameworks-Bench
Popular PHP Frameworks Benchmark.
Stars: ✭ 28 (+64.71%)
Mutual labels:  laminas
SlmQueue
Laminas / Mezzio module that integrates with various queue management systems.
Stars: ✭ 135 (+694.12%)
Mutual labels:  laminas
zf-dependency-injection
Advanced dependency injection for laminas framework
Stars: ✭ 17 (+0%)
Mutual labels:  laminas
REST-Api-with-Slim-PHP
REST API with PHP Slim Framework 3 and MySQL
Stars: ✭ 69 (+305.88%)
Mutual labels:  monolog
laravel-log-mailer
A package to support logging via email in Laravel
Stars: ✭ 14 (-17.65%)
Mutual labels:  monolog
laminas-dependency-plugin
Replace zendframework and zfcampus packages with their Laminas Project equivalents.
Stars: ✭ 32 (+88.24%)
Mutual labels:  laminas
SlmMail
Send mail from Laminas or Mezzio using external mail services.
Stars: ✭ 107 (+529.41%)
Mutual labels:  laminas
monolog-sentry-handler
Monolog handler for Sentry PHP SDK v2 with breadcrumbs support
Stars: ✭ 34 (+100%)
Mutual labels:  monolog
monolog-google-cloud-json-formatter
A Monolog extension for formatting log entries for Google Cloud Logging
Stars: ✭ 15 (-11.76%)
Mutual labels:  monolog

Monolog integration to Laminas Build Status Code Coverage Scrutinizer Code Quality

Integration to Laminas with great logging system monolog

INSTALL

The recommended way to install is through composer from command line.

composer require enlitepro/enlite-monolog

USAGE

  1. Add EnliteMonolog to your config/application.config.php to enable module.
// usage over service locator
$serviceLocator->get('EnliteMonologService')->debug('hello world');

use EnliteMonolog\Service\MonologServiceAwareInterface,
    EnliteMonolog\Service\MonologServiceAwareTrait;

// usage in your services
class MyService implements MonologServiceAwareInterface
{
    use MonologServiceAwareTrait;

    public function whatever()
    {
        $this->getMonologService()->debug('hello world');
    }
}
  1. Copy the config file config/monolog.global.php.dist from the module to config/autoload your project.

By default it write logs to data/logs/application.log. If you want change this behaviour, add your config following:

    'EnliteMonolog' => array(
        'EnliteMonologService' => array(
            // Logger name
            // 'name' => 'EnliteMonolog',

            // Handlers, it can be service locator alias(string) or config(array)
            'handlers' => array(
                // by config
                'default' => array(
                    'name' => 'Monolog\Handler\StreamHandler',
                    'args' => array(
                        'stream' => 'data/log/application.log',
                        'level' => \Monolog\Logger::DEBUG,
                        'bubble' => true
                    ),
                    'formatter' => array(
                        'name' => 'Monolog\Formatter\LogstashFormatter',
                        'args' => array(
                            'applicationName' => 'My Application',
                        ),
                    ),
                ),

                // by service locator
                'MyMonologHandler'
            )
        ),

        // you can specify another logger
        // for example ChromePHPHandler

        'MyChromeLogger' => array(
            'name' => 'MyName',
            'handlers' => array(
                array(
                    'name' => 'Monolog\Handler\ChromePHPHandler',
                )
            )
        )
    ),

now you can use it

$serviceLocator->get('EnliteMonologService')->debug('hello world');
$serviceLocator->get('MyChromeLogger')->debug('hello world');

Contributing

This library attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].