2017 © Pedro Peláez
 

library silex-application-log

Application log

image

coderockr/silex-application-log

Application log

  • Thursday, July 27, 2017
  • by eminetto
  • Repository
  • 1 Watchers
  • 5 Stars
  • 367 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 1 Versions
  • 1 % Grown

The README.md

Codacy Badge, (*1)

Silex Application Log

Require

"silex/silex": "v1.3.4" and "monolog/monolog": "^1.17", (*2)

Install

php composer.phar require coderockr/silex-application-log

Configuration

Keys processor, streamHandler, slackHandler and logglyHandler opcional, (*3)

$config = [
    'config' => [
        'applicationLog' => [
            'name' => 'Name You Log',
            'processor' => [ //opcional
                'Monolog\Processor\IntrospectionProcessor',
                'Monolog\Processor\MemoryUsageProcessor',
                'Monolog\Processor\ProcessIdProcessor',
                'Monolog\Processor\WebProcessor',
            ],
            'streamHandler' => [
                'stream' => 'path/to/application.log',
                'level' => 'DEBUG', //opcional
                'bubble' => true, //opcional
                'filePermission' => null, //opcional
                'useLocking' => false //opcional
            ],
            'slackHandler' => [
                'token' => '1234567890',
                'channel' => '#tests',
                'username' => 'tests', //opcional
                'useAttachment' => 'attach user', //opcional
                'iconEmoji' => ':sweat:', //opcional
                'level' => 'CRITICAL', //opcional
                'bubble' => true, //opcional
                'useShortAttachment' => false, //opcional
                'includeContextAndExtra' => false //opcional
            ],
            'logglyHandler' => [
                'token' => '1234567890',
                'level' => 'ERROR', //opcional
                'bubble' => true //opcional
            ],
            'sentryHandler' => [
                'token' => '1234567890',
                'level' => 'ERROR', //opcional
            ],
        ]
    ]
];

Usage

$app = new Application();
$app->register(new \ApplicationLog\Provider\ApplicationLog(), $config);

The Versions

27/07 2017