forked from OxCom/symfony-rollbar-bundle
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Why the minimum level of reporting is set to ERROR? #57
Comments
Yes, it's easy:
parameters:
rollbar.config:
access_token: 'your_access_token'
environment: 'your_environment'
code_version: 'your_code_version'
allow_exec: false
exception_sample_rates:
Symfony\Component\HttpKernel\Exception\HttpException: 0
# any other options available in https://docs.rollbar.com/docs/php-configuration-reference
services:
App\Logger\Handler\RollbarHandlerFactory:
$config: '%rollbar.config%'
Rollbar\Monolog\Handler\RollbarHandler:
factory: ['@App\Logger\Handler\RollbarHandlerFactory', createRollbarHandler]
tags:
- { name: monolog.logger, channel: rollbar }
<?php
namespace App\Logger\Handler;
use Psr\Log\LogLevel;
use Rollbar\Monolog\Handler\RollbarHandler;
use Rollbar\Rollbar;
class RollbarHandlerFactory
{
public function __construct(array $config)
{
Rollbar::init($config, false, false, false);
}
public function createRollbarHandler(): RollbarHandler
{
return new RollbarHandler(Rollbar::logger(), LogLevel::INFO);
}
}
|
Just been trying to figure out why Symfony's Is there any chance this will be fixed, or a PR accepted/tagged? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi All!
I need to send Debug & Info messages through this bundle (Its possible to do it with the SDK of rollbar)
But in the RollBarHandlerFactory of this bundle set the minimum level in ERROR. It means that i cant send any event below error level (ie info / debug levels)
So $logger->info('INFO MESSAGE') wont work :S
See the code
/** * Create RollbarHandler * * @return RollbarHandler */ public function createRollbarHandler() { return new RollbarHandler(Rollbar::logger(), LogLevel::ERROR); }
Any suggestions?
Thanks a lot
The text was updated successfully, but these errors were encountered: