-
Notifications
You must be signed in to change notification settings - Fork 28
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
Adds possibility to override MonologAdapter in config #19
Conversation
Sorry for the force push, forgot to change visibility from private to protected |
@@ -41,7 +41,7 @@ class MonologAdapter extends Logger | |||
/** | |||
* @var Monolog\Logger | |||
*/ | |||
private $monolog; | |||
protected $monolog; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not needed, since you can catch the constuctor argument in the inherited class
@@ -75,7 +76,7 @@ public function loadConfiguration() | |||
|
|||
// Tracy adapter | |||
$builder->addDefinition($this->prefix('adapter')) | |||
->setClass('Kdyby\Monolog\Diagnostics\MonologAdapter', [$this->prefix('@logger')]) | |||
->setClass($config['adapter'], [$this->prefix('@logger')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK you can already do this using services
section of neon configuration, no?
I believe you can do so using the
If there is a real need for this, there should be a switch in extension configuration. Otherwise, the whole point of this package is to mainly add monolog to tracy and keep bluescreen rendering working. So I'm not sure it really is needed.
That should be done with registering a custom processor.
Forcepushes are completely fine in pull requests. |
If some of the problems mentioned are still an issue for you, let's solve them one by one. I don't think the proposed way is a good solution for any of those mentioned problems. But thank you for the PR! |
You can now specify your own Adapter in the config.neon, in which you can for example opt out from having exceptions saved to a file or add more context to your error messages (such as current Request etc.)