src/Config/Loader/ClassLoader/HandlerLoader.php
private function populateFormatters(array &$handlerOptions, array $formatters)
    {
        if (isset($handlerOptions['formatter'])) {
            if (isset($formatters[$handlerOptions['formatter']])) {
                $handlerOptions['formatter'] = $formatters[$handlerOptions['formatter']];
            } else {
                throw new \InvalidArgumentException(
                    sprintf(
                        'Formatter %s not found in the configured formatters',
                        $handlerOptions['formatter']
                    )
                );
            }
        }
    }
private function populateFormatters(array &$handlerOptions, array $formatters)
    {
        if (isset($handlerOptions['formatter'])) {
            if (isset($formatters[$handlerOptions['formatter']])) {
                $handlerOptions['formatter'] = $formatters[$handlerOptions['formatter']];
            } else {
                throw new \InvalidArgumentException(
                    sprintf(
                        'Formatter %s not found in the configured formatters',
                        $handlerOptions['formatter']
                    )
                );
            }
        }
    }
private function populateFormatters ( array & $ handlerOptions , array $ formatters ) { if ( isset ( $ handlerOptions [ 'formatter' ] ) ) { if ( isset ( $ formatters [ $ handlerOptions [ 'formatter' ] ] ) ) { $ handlerOptions [ 'formatter' ] = $ formatters [ $ handlerOptions [ 'formatter' ] ] ; } else { throw new \ InvalidArgumentException ( sprintf ( 'Formatter %s not found in the configured formatters' , $ handlerOptions [ 'formatter' ] ) ) ; } } }
Replace the formatter name in the option array with the corresponding object from the
formatter array passed in if it exists.

If no formatter is specified in the options, Monolog will use its default formatter for the
handler

@throws \InvalidArgumentException

@param  array &$handlerOptions Handler options
@param  FormatterInterface[] $formatters Array of formatter to pick from
Replace the formatter name in the option array with the corresponding object from the formatter array passed in if it exists .