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

Already on GitHub? Sign in to your account

Allow passing of openlog() options in SyslogHandler ctor #109

merged 2 commits into from Aug 29, 2012


None yet
4 participants

dzuelke commented Aug 29, 2012

Hardcoded to LOG_PID right now, and I need different settings in a project :)

This pull request passes (merged 76fb21b into 75af99d).

@stof stof commented on an outdated diff Aug 29, 2012

@@ -67,7 +67,7 @@ class SyslogHandler extends AbstractProcessingHandler
* @param integer $level The minimum logging level at which this handler will be triggered
* @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
- public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true)
+ public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $logopts = LOG_PID)

stof Aug 29, 2012


you need to update the phpdoc too

@stof stof commented on the diff Aug 29, 2012

@@ -26,6 +27,9 @@ public function testConstruct()
$handler = new SyslogHandler('test', 'user');
$this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler);
+ $handler = new SyslogHandler('test', LOG_USER, Logger::DEBUG, true, LOG_PERROR);
+ $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler);

stof Aug 29, 2012


This does not test anything: this test will also pass with the current code as PHP does not complain about extra arguments :)


dzuelke Aug 29, 2012


Yes, but that's true for the other tests in there as well...

This pull request passes (merged 1feffd3 into 75af99d).

@Seldaek Seldaek added a commit that referenced this pull request Aug 29, 2012

@Seldaek Seldaek Merge pull request #109 from dzuelke/openlog
Allow passing of openlog() options in SyslogHandler ctor

@Seldaek Seldaek merged commit 2c4c792 into Seldaek:master Aug 29, 2012


Seldaek commented Aug 29, 2012

Merged thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment