File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 5656 * - [bubble]: bool, defaults to true
5757 *
5858 * - mongo:
59- * - mongo:
60- * - id: optional if host is given
59+ * - mongo:
60+ * - id: optional if host is given
6161 * - host: database host name, optional if id is given
6262 * - [port]: defaults to 27017
6363 * - [user]: database user name
64- * - pass: mandatory if user is present
64+ * - pass: mandatory only if user is present
6565 * - [database]: defaults to monolog
6666 * - [collection]: defaults to logs
6767 * - [level]: level name or int value, defaults to DEBUG
@@ -480,6 +480,10 @@ public function getConfigTreeBuilder()
480480 ->ifTrue (function ($ v ) { return 'cube ' === $ v ['type ' ] && empty ($ v ['url ' ]); })
481481 ->thenInvalid ('The url has to be specified to use a CubeHandler ' )
482482 ->end ()
483+ ->validate ()
484+ ->ifTrue (function ($ v ) { return 'mongo ' === $ v ['type ' ] && !isset ($ v ['mongo ' ]); })
485+ ->thenInvalid ('The mongo configuration has to be specified to use a MongoHandler ' )
486+ ->end ()
483487 ->validate ()
484488 ->ifTrue (function ($ v ) { return 'amqp ' === $ v ['type ' ] && empty ($ v ['exchange ' ]); })
485489 ->thenInvalid ('The exchange has to be specified to use a AmqpHandler ' )
You can’t perform that action at this time.
0 commit comments