info('This is an example log message.'); } $a = []; $b = $a['foo']; // <-- This will throw a notice that will be caught by the logger $exception = new \Exception('This is an example exception.'); $logger->error("test", $exception); $example = new ExampleClass($logger); $example->sleepExample(5); $example->throwDoubleException();