{"action":"closed","issue":{"url":"https://api.github.com/repos/noodlehaus/logger/issues/1","labels_url":"https://api.github.com/repos/noodlehaus/logger/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/noodlehaus/logger/issues/1/comments","events_url":"https://api.github.com/repos/noodlehaus/logger/issues/1/events","html_url":"https://github.com/noodlehaus/logger/issues/1","id":123332161,"number":1,"title":"Different implementation","user":{"login":"jm42","id":3297150,"avatar_url":"https://avatars.githubusercontent.com/u/3297150?v=3","gravatar_id":"","url":"https://api.github.com/users/jm42","html_url":"https://github.com/jm42","followers_url":"https://api.github.com/users/jm42/followers","following_url":"https://api.github.com/users/jm42/following{/other_user}","gists_url":"https://api.github.com/users/jm42/gists{/gist_id}","starred_url":"https://api.github.com/users/jm42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jm42/subscriptions","organizations_url":"https://api.github.com/users/jm42/orgs","repos_url":"https://api.github.com/users/jm42/repos","events_url":"https://api.github.com/users/jm42/events{/privacy}","received_events_url":"https://api.github.com/users/jm42/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-21T18:25:04Z","updated_at":"2016-01-29T09:31:18Z","closed_at":"2016-01-29T09:31:18Z","body":"Hey. I like the idea.\r\n\r\nI was thinking about priorities such as [syslog](https://secure.php.net/manual/en/function.syslog.php) uses.\r\n\r\nSo I came with an alternative implementation that will accept the level as first argument:\r\n\r\n```php\r\n$logger = logger(\"prod.log\", LOG_ERR);\r\n\r\n// This won't be logged\r\n$logger(LOG_DEBUG, \"The value %f should be %s\", 123.1, '123');\r\n\r\n// This will\r\n$logger(LOG_CRIT, \"The application is unavailable\");\r\n```\r\n\r\nThis way is more restrict as it has not a free condition. The condition is fixed that the given level should be lower than the one given when created. But restricting this is not big deal and it's preferred (in my opinion) to allow easy to use.\r\n\r\nNow there is one function for all possible logging needs, which I like it more as I can pass it from one side to another as a single parameter.\r\n\r\nImplementation can be found here: https://gist.github.com/jm42/ac120fbdb5379c5c0b36"}}