I'm following this monolog tutorial and the example with trying to send a critical log via email using Swift. monolog+swift_tutorial
i've copied the code exactly, which is located under heading Handler order in the tutorial link. I've changed the username and password and email information to my gmail account to send an email to myself etc. However i recieve this error with this statement:
$logger->addCritical('Hey, a critical log entry!');
And recieve the following error:
Fatal error: Uncaught Error: Call to undefined method Monolog\Logger::addCritical()
I'm using Monolog version: "^2" in my composer.json
So this means the function doesn't exist, so i searched for the function in google, and found other examples of people using this method for their monolog instances, however when i try to use it, as the tutorial shows, i receive undefined method. Could this be an issue with my monolog version? I've also updated everything with composer.