2017 © Pedro Peláez
 

library raven-nette

Nette implementation of sentry raven-php as logger service for tracy.

image

salamek/raven-nette

Nette implementation of sentry raven-php as logger service for tracy.

  • Sunday, March 11, 2018
  • by Salamek
  • Repository
  • 2 Watchers
  • 5 Stars
  • 27,471 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 6 Forks
  • 1 Open issues
  • 9 Versions
  • 6 % Grown

The README.md

Project abandoned due to incompatibility with nette 2.4

Please use kdyby/monolog instead, (*1)

Simple migration guide

  1. Remove all configuration related to salamek/raven-nette && composer depedency from composer.json
  2. Install kdyby/monolog and sentry/sentry
composer require kdyby/monolog
composer require sentry/sentry
  1. Configure new extension
sentry:
    dsn: 'YOUR_SENTRY_DSN'
extensions:
    monolog: Kdyby\Monolog\DI\MonologExtension

monolog:
    name: PROJECT_NAME
    hookToTracy: true
    registerFallback: true
    handlers:
        raven: Monolog\Handler\RavenHandler(Raven_Client(%sentry.dsn%))
    processors:
        - Monolog\Processor\GitProcessor
        - Monolog\Processor\WebProcessor
        - Kdyby\Monolog\Processor\PriorityProcessor
  1. Profit... For more informations consult kdyby/monolog documentation

raven-nette

Donate, (*2)

This is nette implementation of sentry raven-php as logger service for tracy., (*3)

Tested with nette 2.2>, please report any bugs into Issues, (*4)

PR's are welcomed!, (*5)

Installation and usage

Installation via composer:

composer require salamek/raven-nette

Usage

Register extension to your config.neon:, (*6)

extensions:
  sentryLogger: Salamek\RavenNette\DI\SentryLoggerExtension

And configure by setting:, (*7)

sentryLogger:
  dsn: 'YOUR_SENTRY_DSN'

  # Optional configuration values
  inDebug: false # bool: Log in debug mode ? default is false
  directory: null # string|null: Where to store log files ? default is Debugger::$logDirectory, null to disable
  email: null # string|null :Where to send email notifications ? default is Debugger::$email, null to disable
  options: [release: YOUR_RELEASE] # array :All options supported by getsentry/sentry-php
  context:
    user: true # Send logged in user information

List of all confuration options for getsentry/sentry-php, (*8)

Alternative Usage

If you dont want to use DI, and/or be able to log errors as soon as posible use this approach, (*9)

Put this code into your app/bootstrap.php after RobotLoader is initiated and $configurator->enableDebugger is called:, (*10)

// Initiate sentryLogger
new \Salamek\RavenNette\SentryLogger(
  'YOUR_SENTRY_DSN', //Sentry DSN
  false, //Log in DEBUG mode ? //You dont want that...
  null, //Set where do you want to store file log (Tracy\Debugger::$logDirectory | null | string)
  null, //Send email as usual logger ?   (Tracy\Debugger::$email | null | string | array )
  true,
  ['release' => 'YOUR_RELEASE'] //All options supported by getsentry/sentry-php
);

Usage only with tracy

If you dont want use nette at all but only raven-nette and tracy... well you can!, (*11)

include('vendor/autoload.php');
use Tracy\Debugger;

Debugger::enable(Debugger::PRODUCTION);

new \Salamek\RavenNette\SentryLogger(
  'YOUR_SENTRY_DSN', //Sentry DSN
  false, //Log in DEBUG mode ? //You dont want that...
  null, //Set where do you want to store file log (Tracy\Debugger::$logDirectory | null | string)
  null, //Send email as usual logger ?   (Tracy\Debugger::$email | null | string | array )
  true,
  ['release' => 'YOUR_RELEASE'] //All options supported by getsentry/sentry-php
);

Debugger::log('My error', 'error');

And that should be everything..., (*12)

The Versions

11/03 2018

dev-master

9999999-dev https://github.com/Salamek/raven-nette

Nette implementation of sentry raven-php as logger service for tracy.

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

nette raven sentry tracy debbuger

21/02 2017

v1.3.3

1.3.3.0 https://github.com/Salamek/raven-nette

Nette implementation of sentry raven-php as logger service for tracy.

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

nette raven sentry tracy debbuger

23/09 2016

v1.3.2

1.3.2.0 https://github.com/Salamek/raven-nette

Nette implementation of sentry raven-php as logger service for tracy.

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

nette raven sentry tracy debbuger

11/05 2016

v1.3.1

1.3.1.0 https://github.com/Salamek/raven-nette

Nette implementation of sentry raven-php as logger service for tracy.

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

nette raven sentry tracy debbuger

22/04 2016

v1.3.0

1.3.0.0 https://github.com/Salamek/raven-nette

Nette implementation of sentry raven-php as logger service for tracy.

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

nette raven sentry tracy debbuger

17/02 2016

v1.2.0

1.2.0.0 https://github.com/Salamek/raven-nette

Nette implementation of sentry raven-php as logger service for tracy.

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

nette raven sentry tracy debbuger

09/02 2016

v1.1.1

1.1.1.0 https://github.com/Salamek/raven-nette

Nette implementation of sentry raven-php as logger service for tracy.

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

nette raven sentry tracy debbuger

09/02 2016

v1.1

1.1.0.0 https://github.com/Salamek/raven-nette

Nette implementation of sentry raven-php as logger service for tracy.

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

nette raven sentry tracy debbuger

13/05 2015

v1.0-alpha

1.0.0.0-alpha https://github.com/Salamek/raven-nette

Nette implementation of sentry raven-php as logger service for tracy.

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

nette raven sentry tracy debbuger