{"action":"created","issue":{"url":"https://api.github.com/repos/getsentry/sentry-laravel/issues/142","repository_url":"https://api.github.com/repos/getsentry/sentry-laravel","labels_url":"https://api.github.com/repos/getsentry/sentry-laravel/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/getsentry/sentry-laravel/issues/142/comments","events_url":"https://api.github.com/repos/getsentry/sentry-laravel/issues/142/events","html_url":"https://github.com/getsentry/sentry-laravel/issues/142","id":335795279,"node_id":"MDU6SXNzdWUzMzU3OTUyNzk=","number":142,"title":"Sentry Logging Time Issue","user":{"login":"Vladelis","id":17528024,"node_id":"MDQ6VXNlcjE3NTI4MDI0","avatar_url":"https://avatars0.githubusercontent.com/u/17528024?v=4","gravatar_id":"","url":"https://api.github.com/users/Vladelis","html_url":"https://github.com/Vladelis","followers_url":"https://api.github.com/users/Vladelis/followers","following_url":"https://api.github.com/users/Vladelis/following{/other_user}","gists_url":"https://api.github.com/users/Vladelis/gists{/gist_id}","starred_url":"https://api.github.com/users/Vladelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vladelis/subscriptions","organizations_url":"https://api.github.com/users/Vladelis/orgs","repos_url":"https://api.github.com/users/Vladelis/repos","events_url":"https://api.github.com/users/Vladelis/events{/privacy}","received_events_url":"https://api.github.com/users/Vladelis/received_events","type":"User","site_admin":false},"labels":[{"id":922491347,"node_id":"MDU6TGFiZWw5MjI0OTEzNDc=","url":"https://api.github.com/repos/getsentry/sentry-laravel/labels/feature%20request","name":"feature request","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-06-26T12:25:41Z","updated_at":"2018-11-15T08:41:46Z","closed_at":null,"author_association":"NONE","body":"Since Laravel 5.6 there is an logging config file thus making it easier to get the application logs onto sentry. The issue I kept running into is that the log displays its time with the default formatter and each log with the same message creates a new issue in sentry.\r\nI made a solution by creating a CustomFormatter class and tapped it into the sentry channel to change the formatter into one that truncates the time from the message.\r\nIs there a cleaner and better way of solving this? Seems like a lot of ugly code for some basic functionality.\r\n```php\r\n<?php\r\n\r\nnamespace Certificates\\Logging;\r\n\r\nuse Monolog\\Formatter\\LineFormatter;\r\n\r\nclass CustomFormatter\r\n{\r\n    /**\r\n     * @param  \\Illuminate\\Log\\Logger  $logger\r\n     * @return void\r\n     */\r\n    public function __invoke($logger)\r\n    {\r\n        foreach ($logger->getHandlers() as $handler) {\r\n            $handler->setFormatter(new LineFormatter(\"%channel%.%level_name%: %message% %context% %extra%\\n\",null, false,true));\r\n        }\r\n    }\r\n}\r\n```\r\n\r\n```php\r\n        'sentry' => [\r\n            'driver' => 'sentry',\r\n            'tap' => [Certificates\\Logging\\CustomFormatter::class],\r\n        ],\r\n```"},"comment":{"url":"https://api.github.com/repos/getsentry/sentry-laravel/issues/comments/438961417","html_url":"https://github.com/getsentry/sentry-laravel/issues/142#issuecomment-438961417","issue_url":"https://api.github.com/repos/getsentry/sentry-laravel/issues/142","id":438961417,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODk2MTQxNw==","user":{"login":"stayallive","id":1090754,"node_id":"MDQ6VXNlcjEwOTA3NTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1090754?v=4","gravatar_id":"","url":"https://api.github.com/users/stayallive","html_url":"https://github.com/stayallive","followers_url":"https://api.github.com/users/stayallive/followers","following_url":"https://api.github.com/users/stayallive/following{/other_user}","gists_url":"https://api.github.com/users/stayallive/gists{/gist_id}","starred_url":"https://api.github.com/users/stayallive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stayallive/subscriptions","organizations_url":"https://api.github.com/users/stayallive/orgs","repos_url":"https://api.github.com/users/stayallive/repos","events_url":"https://api.github.com/users/stayallive/events{/privacy}","received_events_url":"https://api.github.com/users/stayallive/received_events","type":"User","site_admin":false},"created_at":"2018-11-15T08:41:46Z","updated_at":"2018-11-15T08:41:46Z","author_association":"MEMBER","body":"Happy to accept a PR to make this the default 👍 "}}
{"actor":{"display_login":"stayallive"}}