Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update \Monolog\Handlers\RollbarHandler to support master #128

Closed
ArturMoczulski opened this issue Apr 14, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@ArturMoczulski
Copy link
Contributor

commented Apr 14, 2017

The current version of \Monolog\Handlers\RollbarHandler is not compatible with code in master. It requires an instance of RollbarNotifier to be injected in the constructor. RollbarNotifier class has been replaced with RollbarLogger in rollbar/rollbar-php:master

@ArturMoczulski ArturMoczulski self-assigned this Apr 14, 2017

@ArturMoczulski

This comment has been minimized.

Copy link
Contributor Author

commented Apr 14, 2017

After further investigation, I can see that current master can be used with Monolog since our Logger is PSR-3 compliant. We need to update the README.md with new instructions how to use it though:

$log = new \Monolog\Logger('SampleRollbarPHP\Monolog');
$psrHandler = new \Monolog\Handler\PsrHandler(Rollbar::logger());
$log->pushHandler($psrHandler);
$log->error($msg);

It also means that \Monolog\Handlers\RollbarHandler is deprecated and only compatible with rollbar-php before master.

TO DO:

  1. Update README.md
  2. Mark \Monolog\Handlers\RollbarHandler as deprecated.
@alister

This comment has been minimized.

Copy link

commented May 19, 2017

Adding instructions for how to use Rollbar-php, via a PSR-3 wrapper, in the MonologBundle configuration would also help me to upgrade to version 1.*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.