======= Logging ======= .. sectionauthor:: Bernhard Posselt The logger can be injected from the ServerContainer: .. code-block:: php getContainer(); /** * Controllers */ $container->registerService('AuthorService', function($c) { return new AuthorService( $c->query('Logger'), $c->query('AppName') ); }); $container->registerService('Logger', function($c) { return $c->query('ServerContainer')->getLogger(); }); } } and then be used in the following way: .. code-block:: php logger = $logger; $this->appName = $appName; } public function log($message) { $this->logger->error('hi', array('app' => $this->appName)); } } The following methods are available: * **emergency** * **alert** * **critical** * **error** * **warning** * **notice** * **info** * **debug**