{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/6445","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/6445/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/6445/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/6445/events","html_url":"https://github.com/cakephp/cakephp/issues/6445","id":71811983,"number":6445,"title":"LoggerPlugin","user":{"login":"kallep87","id":11929693,"avatar_url":"https://avatars.githubusercontent.com/u/11929693?v=3","gravatar_id":"","url":"https://api.github.com/users/kallep87","html_url":"https://github.com/kallep87","followers_url":"https://api.github.com/users/kallep87/followers","following_url":"https://api.github.com/users/kallep87/following{/other_user}","gists_url":"https://api.github.com/users/kallep87/gists{/gist_id}","starred_url":"https://api.github.com/users/kallep87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kallep87/subscriptions","organizations_url":"https://api.github.com/users/kallep87/orgs","repos_url":"https://api.github.com/users/kallep87/repos","events_url":"https://api.github.com/users/kallep87/events{/privacy}","received_events_url":"https://api.github.com/users/kallep87/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-29T08:20:30Z","updated_at":"2015-04-29T08:21:08Z","closed_at":null,"body":"hey, \r\ni want to create a Logger Plugin\r\n\r\nmy Path to the File:\r\nplugins/DatabaseLogger/src/Log/Engine\r\n\r\nmy php-File DatabaseLog.php\r\n```php\r\n<?php\r\n\r\nnamespace App\\Log\\Engine;\r\n\r\nuse Cake\\Log\\Engine\\BaseLog;\r\nuse Cake\\ORM\\TableRegistry;\r\n\r\nclass DatabaseLog extends BaseLog{\r\n\r\n  private $Model;\r\n\r\n  public function __construct(array $config = []){\r\n    parent::__construct($config);\r\n  }\r\n\r\n  public function log($level, $message, array $context = []){\r\n    \r\n    //Laden des Models\r\n    if(!$context || !array_key_exists('model', $context)){\r\n       $context['model'] = 'SystemLogs';\r\n    }\r\n    $this->Model = TableRegistry::get($context['model']);\r\n    \r\n    $log_data = [\r\n      'level' => $level,\r\n      'message' => $message\r\n    ]; \r\n\r\n    $entity = $this->Model->newEntity($log_data);\r\n    $this->Model->save($entity);\r\n    \r\n    return true;\r\n  }\r\n}\r\n```\r\n\r\nmy composer.json:\r\n```json\r\n\"autoload\": {\r\n        \"psr-4\": {\r\n            \"App\\\\\": \"src\",\r\n            \"DatabaseLogger\\\\\": \"./plugins/DatabaseLogger/src\"\r\n        }\r\n    },\r\n```\r\n\r\nand my app.php\r\n```php\r\n'Log' => [\r\n      'debug' => [\r\n          'className' => 'DatabaseLogger.DatabaseLog'\r\n      ]  \r\n    ],\r\n```\r\n\r\nWhen I open my application, I get the following error: Error: Could not load class DatabaseLog\r\nFatal error: Uncaught exception 'RuntimeException' with message 'Could not load class DatabaseLog' in /Users/patrick/Sites/vz/vendor/cakephp/cakephp/src/Log/LogEngineRegistry.php:57 Stack trace: #0 /Users/patrick/Sites/vz/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php(86): Cake\\Log\\LogEngineRegistry->_throwMissingClassError('DatabaseLog', 'DatabaseLogger') #1 /Users/patrick/Sites/vz/vendor/cakephp/cakephp/src/Log/Log.php(198): Cake\\Core\\ObjectRegistry->load('debug', Array) #2 /Users/patrick/Sites/vz/vendor/cakephp/cakephp/src/Log/Log.php(180): Cake\\Log\\Log::_loadConfig() #3 /Users/patrick/Sites/vz/vendor/cakephp/cakephp/src/Log/Log.php(360): Cake\\Log\\Log::_init() #4 /Users/patrick/Sites/vz/vendor/cakephp/cakephp/src/Log/Log.php(462): Cake\\Log\\Log::write('error', '[RuntimeExcepti...', Array) #5 /Users/patrick/Sites/vz/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(245): Cake\\Log\\Log::error('[RuntimeExcepti...') #6 /Users/patrick/Sites/vz/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(156): Cake\\Error\\Base in /Users/patrick/Sites/vz/vendor/cakephp/cakephp/src/Log/LogEngineRegistry.php on line 57\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/97350014","html_url":"https://github.com/cakephp/cakephp/issues/6445#issuecomment-97350014","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/6445","id":97350014,"user":{"login":"kallep87","id":11929693,"avatar_url":"https://avatars.githubusercontent.com/u/11929693?v=3","gravatar_id":"","url":"https://api.github.com/users/kallep87","html_url":"https://github.com/kallep87","followers_url":"https://api.github.com/users/kallep87/followers","following_url":"https://api.github.com/users/kallep87/following{/other_user}","gists_url":"https://api.github.com/users/kallep87/gists{/gist_id}","starred_url":"https://api.github.com/users/kallep87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kallep87/subscriptions","organizations_url":"https://api.github.com/users/kallep87/orgs","repos_url":"https://api.github.com/users/kallep87/repos","events_url":"https://api.github.com/users/kallep87/events{/privacy}","received_events_url":"https://api.github.com/users/kallep87/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T08:21:07Z","updated_at":"2015-04-29T08:21:07Z","body":"Where here is my fault"}}