Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Log

ZF2 Module. For logging anything

Installation

Main Setup

By cloning project

Clone this project into your ./vendor/ directory.

With composer

Add this project in your composer.json:

"require": {
    "t4web/log": "~1.0.0"
}

Now tell composer to download Authentication by running the command:

$ php composer.phar update

Post installation

Enabling it in your application.config.phpfile.

<?php
return array(
    'modules' => array(
        // ...
        'T4web\Log',
    ),
    // ...
);

Configuring

For define custom scopes, describe it in config:

't4web-log' => [
   'scopes' => [
       'general' => 1,
       'payments' => 2,
       'users' => 3,
       'background-jobs' => 4,
   ],
],

Using

$logger = $this->getServiceLocator()->get(\T4web\Log\Logger::class);
$logger->log('general', 'test message');
$logger->log('general', 'test message', \T4web\Log\Logger::PRIORITY_ERR, ['file' => __FILE__, 'line' => __LINE__]);

If you use t4web\admin it will looks like this: log list

About

ZF2 Module. For logging anything

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages