2017 © Pedro Peláez
 

yii2-extension yii2-sentry-log

Simple Yii2 Sentry target for logging (http://getsentry.com)

image

darkair/yii2-sentry-log

Simple Yii2 Sentry target for logging (http://getsentry.com)

  • Tuesday, July 8, 2014
  • by DarkAiR
  • Repository
  • 4 Watchers
  • 3 Stars
  • 1,744 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 6 Forks
  • 2 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

yii2-sentry-log

Yii2 Sentry target for logging based on Raven client., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

$ php composer.phar require darkair/yii2-sentry-log "dev-master"

or add, (*4)

"darkair/yii2-sentry-log": "dev-master"

to the require section of your composer.json file., (*5)

Usage

Add target class in your project config:, (*6)

'components' => [
    'log' => [
        'targets' => [
            [
                'class' => 'sentry\SentryTarget',
                'levels' => ['error', 'warning'],   // or smth else
                'dsn' => '',                        // sentry access string
            ],
        ],
    ],

Then use like ordinary log:, (*7)

Yii::error('some string');

or, (*8)

Yii::error([
    'msg' => 'some message',
    'data' => [...],                // Any pair key=>value for adding to the sentry message 
]);

Note

Because the mechanism of logging is asyncronical, standard sentry stacktrace is unavailable. But this extension sends logger stacktrace in extra parameters of message., (*9)

The Versions

08/07 2014

dev-master

9999999-dev

Simple Yii2 Sentry target for logging (http://getsentry.com)

  Sources   Download

BSD

The Requires

 

The Development Requires

by Dmitry DarkAiR Romanov

logger log logging yii2 sentry target