179179 * - [bubble]: bool, defaults to true
180180 * - [use_ssl]: bool, defaults to true
181181 * - [message_format]: text or html, defaults to text
182+ * - [host]: defaults to "api.hipchat.com"
183+ * - [api_version]: defaults to "v1"
182184 *
183185 * - slack:
184186 * - token: slack api token
@@ -330,6 +332,7 @@ public function getConfigTreeBuilder()
330332 ->scalarNode ('exchange_name ' )->defaultValue ('log ' )->end () // amqp
331333 ->scalarNode ('room ' )->end () // hipchat
332334 ->scalarNode ('message_format ' )->defaultValue ('text ' )->end () // hipchat
335+ ->scalarNode ('api_version ' )->defaultNull ()->end () // hipchat
333336 ->scalarNode ('channel ' )->end () // slack
334337 ->scalarNode ('bot_name ' )->defaultValue ('Monolog ' )->end () // slack
335338 ->scalarNode ('use_attachment ' )->defaultTrue ()->end () // slack
@@ -350,7 +353,7 @@ public function getConfigTreeBuilder()
350353 ->end ()
351354 ->end ()
352355 ->scalarNode ('title ' )->defaultNull ()->end () // pushover
353- ->scalarNode ('host ' )->end () // syslogudp
356+ ->scalarNode ('host ' )->defaultNull ()-> end () // syslogudp & hipchat
354357 ->scalarNode ('port ' )->defaultValue (514 )->end () // syslogudp
355358 ->arrayNode ('publisher ' )
356359 ->canBeUnset ()
@@ -653,6 +656,10 @@ public function getConfigTreeBuilder()
653656 ->ifTrue (function ($ v ) { return 'hipchat ' === $ v ['type ' ] && !in_array ($ v ['message_format ' ], array ('text ' , 'html ' )); })
654657 ->thenInvalid ('The message_format has to be "text" or "html" in a HipChatHandler ' )
655658 ->end ()
659+ ->validate ()
660+ ->ifTrue (function ($ v ) { return 'hipchat ' === $ v ['type ' ] && null !== $ v ['api_version ' ] && !in_array ($ v ['api_version ' ], array ('v1 ' , 'v2 ' ), true ); })
661+ ->thenInvalid ('The api_version has to be "v1" or "v2" in a HipChatHandler ' )
662+ ->end ()
656663 ->validate ()
657664 ->ifTrue (function ($ v ) { return 'slack ' === $ v ['type ' ] && (empty ($ v ['token ' ]) || empty ($ v ['channel ' ])); })
658665 ->thenInvalid ('The token and channel have to be specified to use a SlackHandler ' )
0 commit comments