{"action":"created","issue":{"url":"https://api.github.com/repos/The-Compiler/journalwatch/issues/14","repository_url":"https://api.github.com/repos/The-Compiler/journalwatch","labels_url":"https://api.github.com/repos/The-Compiler/journalwatch/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/The-Compiler/journalwatch/issues/14/comments","events_url":"https://api.github.com/repos/The-Compiler/journalwatch/issues/14/events","html_url":"https://github.com/The-Compiler/journalwatch/pull/14","id":240603501,"number":14,"title":"Add --priority [0<INT<8] command line option","user":{"login":"Marcool04","id":15948152,"avatar_url":"https://avatars2.githubusercontent.com/u/15948152?v=3","gravatar_id":"","url":"https://api.github.com/users/Marcool04","html_url":"https://github.com/Marcool04","followers_url":"https://api.github.com/users/Marcool04/followers","following_url":"https://api.github.com/users/Marcool04/following{/other_user}","gists_url":"https://api.github.com/users/Marcool04/gists{/gist_id}","starred_url":"https://api.github.com/users/Marcool04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marcool04/subscriptions","organizations_url":"https://api.github.com/users/Marcool04/orgs","repos_url":"https://api.github.com/users/Marcool04/repos","events_url":"https://api.github.com/users/Marcool04/events{/privacy}","received_events_url":"https://api.github.com/users/Marcool04/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-07-05T10:15:08Z","updated_at":"2017-07-05T15:13:20Z","closed_at":"2017-07-05T15:02:35Z","pull_request":{"url":"https://api.github.com/repos/The-Compiler/journalwatch/pulls/14","html_url":"https://github.com/The-Compiler/journalwatch/pull/14","diff_url":"https://github.com/The-Compiler/journalwatch/pull/14.diff","patch_url":"https://github.com/The-Compiler/journalwatch/pull/14.patch"},"body":"Hi Florian,\r\n\r\nHope you don't mind me proposing a small change I find useful to journalwatch – a little program I already find very useful as it is!\r\nThis change would allow the user to select the journald log_level under which log messages should not be considered. The option is called \"--priority\", and takes an integer between 1 (only critical messages) and 7 (all messages up to debug).\r\nThis was previously hard coded to LOG_INFO level (number 6) in line 375: \r\n````\r\nj.log_level(journal.LOG_INFO)\r\n````\r\nI have honored the previous default by using config default and setting it at 6.\r\nI find this useful as level 6 messages on my system are mostly noise, and it would require a great many patterns to be written, some of them very wide (ex: \".*id.*\") in order to clean the emails up.\r\n\r\nI have also somewhat clarified the help message concerning the \"--loglevel\" command line option,\r\nwhich refers to the log level of journalwatch's own messages, and could well be confused with the new \"--priority\" option.\r\nHope there are no issues with the code… Let me know if there are.\r\nRegards,\r\nMark."},"comment":{"url":"https://api.github.com/repos/The-Compiler/journalwatch/issues/comments/313133326","html_url":"https://github.com/The-Compiler/journalwatch/pull/14#issuecomment-313133326","issue_url":"https://api.github.com/repos/The-Compiler/journalwatch/issues/14","id":313133326,"user":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars3.githubusercontent.com/u/625793?v=3","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"created_at":"2017-07-05T15:13:20Z","updated_at":"2017-07-05T15:13:20Z","body":"What `nargs='?'` means is that the flag can have either have an option (`--priority 5`) or it can't (simply `--priority`). The latter obviously wasn't valid here.\r\n\r\nI'm mainly busy with [qutebrowser](https://www.qutebrowser.org/) these days, but I'll push a quick release."}}
{"actor":{"display_login":"The-Compiler"}}