{"action":"created","issue":{"url":"https://api.github.com/repos/keboola/php-component/issues/29","repository_url":"https://api.github.com/repos/keboola/php-component","labels_url":"https://api.github.com/repos/keboola/php-component/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/keboola/php-component/issues/29/comments","events_url":"https://api.github.com/repos/keboola/php-component/issues/29/events","html_url":"https://github.com/keboola/php-component/issues/29","id":322891710,"number":29,"title":"Error Log formater should containt context","user":{"login":"Halama","id":903531,"avatar_url":"https://avatars3.githubusercontent.com/u/903531?v=4","gravatar_id":"","url":"https://api.github.com/users/Halama","html_url":"https://github.com/Halama","followers_url":"https://api.github.com/users/Halama/followers","following_url":"https://api.github.com/users/Halama/following{/other_user}","gists_url":"https://api.github.com/users/Halama/gists{/gist_id}","starred_url":"https://api.github.com/users/Halama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Halama/subscriptions","organizations_url":"https://api.github.com/users/Halama/orgs","repos_url":"https://api.github.com/users/Halama/repos","events_url":"https://api.github.com/users/Halama/events{/privacy}","received_events_url":"https://api.github.com/users/Halama/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2018-05-14T16:32:54Z","updated_at":"2018-05-14T21:25:51Z","closed_at":null,"author_association":"MEMBER","body":"https://github.com/keboola/php-component/blob/96d34caa68708a753c559f253edeeb825039d4cd/src/Logger.php#L59\r\n\r\nhttps://github.com/keboola/php-component/pull/28/files#r188015982"},"comment":{"url":"https://api.github.com/repos/keboola/php-component/issues/comments/388968195","html_url":"https://github.com/keboola/php-component/issues/29#issuecomment-388968195","issue_url":"https://api.github.com/repos/keboola/php-component/issues/29","id":388968195,"user":{"login":"Halama","id":903531,"avatar_url":"https://avatars3.githubusercontent.com/u/903531?v=4","gravatar_id":"","url":"https://api.github.com/users/Halama","html_url":"https://github.com/Halama","followers_url":"https://api.github.com/users/Halama/followers","following_url":"https://api.github.com/users/Halama/following{/other_user}","gists_url":"https://api.github.com/users/Halama/gists{/gist_id}","starred_url":"https://api.github.com/users/Halama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Halama/subscriptions","organizations_url":"https://api.github.com/users/Halama/orgs","repos_url":"https://api.github.com/users/Halama/repos","events_url":"https://api.github.com/users/Halama/events{/privacy}","received_events_url":"https://api.github.com/users/Halama/received_events","type":"User","site_admin":false},"created_at":"2018-05-14T21:25:51Z","updated_at":"2018-05-14T21:25:51Z","author_association":"MEMBER","body":"jo jasne, to mi tam nesedelo. Tak potom by to mohlo byt takhle, coz je snad to samy jenom s loggerem.\r\n```php\r\n$appErrHandler = new StreamHandler('php://stderr', \\Monolog\\Logger::CRITICAL, false);\r\n$userErrHandler = new StreamHandler('php://stderr', \\Monolog\\Logger::ERROR, false);\r\n$userErrHandler->setFormatter( new LineFormatter(\"%message%\\n\"));\r\n$handler = new StreamHandler('php://stdout',  \\Monolog\\Logger::INFO);\r\n$handler->setFormatter( new LineFormatter(\"%message%\\n\"));\r\n$logger = new \\Monolog\\Logger('app', [$appErrHandler, $userErrHandler, $handler]);\r\n\r\ntry {\r\n    $app = new MyComponent\\Component();\r\n    $app->run();\r\n    exit(0);\r\n} catch (\\Keboola\\Component\\UserException $e) {\r\n    $logger->error($e->getMessage());\r\n    exit(1);\r\n} catch (\\Throwable $e) {\r\n   $logger->critical($e->getMessage(), [\r\n        'errFile' => $e->getFile(),\r\n        'errLine' => $e->getLine(),\r\n        'trace' => $e->getTrace()\r\n    ]);\r\n    exit(2);\r\n}\r\n```"}}
{"actor":{"display_login":"Halama"}}