There's an error in your config file. The "classALogger" should be
under "loggers".
So, instead of this:
'classALogger' => array('level' => 'DEBUG', 'appenders' =>
array('classAAppender')),
You need this:
'loggers' => array(
'classALogger' => array('level' => 'DEBUG', 'appenders' =>
array('classAAppender')),
)
Then if you log to classALogger, it will write to the file. E.g.:
$logger = Logger::getLogger("classALogger");
$logger->info("Yo.");
Regards,
Ivan
On 31 December 2013 21:35, Matt Brooks <[email protected]> wrote:
> Hello,
>
> I’m having trouble getting my second logger working using this configuration
> array:
>
> Logger::configure(array(
> 'rootLogger' => array('level' => 'DEBUG', 'appenders' => array('default')),
> 'classALogger' => array('level' => 'DEBUG', 'appenders' =>
> array('classAAppender')),
> 'appenders' => array(
> 'default' => array(
> 'class' => 'LoggerAppenderEcho',
> 'layout' => array(
> 'class' => 'LoggerLayoutSimple'
> )
> ),'classAAppender' => array(
> 'class' => 'LoggerAppenderFile',
> 'layout' => array(
> 'class' => 'LoggerLayoutSimple'
> ),
> 'params' => array(
> 'file' => 'log/classA.log',
> 'append' => false
> )
> )
> )
> ));
>
> I can write to the root logger just fine, but can’t seem to log to the
> classALogger. The classAAppender works fine, it must be the way I am setting
> up the classALogger. Any suggestions?
> Thanks!
> Matt