I’ve looked at some example code and think I figured out how to integrate Monolog into a Slim application. In my setup code I’m doing this:
$logger = new \Monolog\Logger($settings['logger']['name']); $logger->pushProcessor(new \Monolog\Processor\UidProcessor()); $logger->pushHandler(new \Monolog\Handler\StreamHandler('php://stder', \Monolog\Logger::DEBUG)); $container['logger'] = $logger;
This works but I’m confused about how to integrate monolog in a more practical manner. What I’d like to achieve is to log anything up to NOTICE to stdout and anything from WARNING to stderr.
How would I do this? Would I need multiple monolog instances?