diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php
index 10c9a616..afe3a966 100644
--- a/DependencyInjection/Configuration.php
+++ b/DependencyInjection/Configuration.php
@@ -92,6 +92,14 @@
* - [level]: level name or int value, defaults to DEBUG
* - [bubble]: bool, defaults to true
*
+ * - syslogudp:
+ * - host: syslogd host name
+ * - [port]: defaults to 514
+ * - [facility]: defaults to LOG_USER
+ * - [logopts]: defaults to LOG_PID
+ * - [level]: level name or int value, defaults to DEBUG
+ * - [bubble]: bool, defaults to true
+ *
* - swift_mailer:
* - from_email: optional if email_prototype is given
* - to_email: optional if email_prototype is given
@@ -248,6 +256,8 @@ public function getConfigTreeBuilder()
->end()
->end()
->scalarNode('title')->defaultNull()->end() // pushover
+ ->scalarNode('host')->end() // syslogudp
+ ->scalarNode('port')->defaultValue(514)->end() // syslogudp
->arrayNode('publisher')
->canBeUnset()
->beforeNormalization()
@@ -475,6 +485,10 @@ public function getConfigTreeBuilder()
->ifTrue(function($v) { return 'service' === $v['type'] && !isset($v['id']); })
->thenInvalid('The id has to be specified to use a service as handler')
->end()
+ ->validate()
+ ->ifTrue(function($v) { return 'syslogudp' === $v['type'] && !isset($v['host']); })
+ ->thenInvalid('The host has to be specified to use a syslogudp as handler')
+ ->end()
->validate()
->ifTrue(function($v) { return 'gelf' === $v['type'] && !isset($v['publisher']); })
->thenInvalid('The publisher has to be specified to use a GelfHandler')
diff --git a/DependencyInjection/MonologExtension.php b/DependencyInjection/MonologExtension.php
index b80d8894..4872d7fe 100644
--- a/DependencyInjection/MonologExtension.php
+++ b/DependencyInjection/MonologExtension.php
@@ -283,6 +283,16 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
));
break;
+ case 'syslogudp':
+ $definition->setArguments(array(
+ $handler['host'],
+ $handler['port'],
+ $handler['facility'],
+ $handler['level'],
+ $handler['bubble'],
+ ));
+ break;
+
case 'swift_mailer':
$oldHandler = false;
// fallback for older symfony versions that don't have the new SwiftMailerHandler in the bridge
diff --git a/Resources/config/monolog.xml b/Resources/config/monolog.xml
index bf745ae4..4e90e948 100644
--- a/Resources/config/monolog.xml
+++ b/Resources/config/monolog.xml
@@ -13,6 +13,7 @@
Monolog\Handler\BufferHandler
Monolog\Handler\RotatingFileHandler
Monolog\Handler\SyslogHandler
+ Monolog\Handler\SyslogUdpHandler
Monolog\Handler\NullHandler
Monolog\Handler\TestHandler
Monolog\Handler\GelfHandler
diff --git a/Resources/config/schema/monolog-1.0.xsd b/Resources/config/schema/monolog-1.0.xsd
index 8ef32494..1afc0d4c 100644
--- a/Resources/config/schema/monolog-1.0.xsd
+++ b/Resources/config/schema/monolog-1.0.xsd
@@ -32,6 +32,8 @@
+
+