{"action":"created","issue":{"url":"https://api.github.com/repos/p0pr0ck5/FreeWAF/issues/9","labels_url":"https://api.github.com/repos/p0pr0ck5/FreeWAF/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/p0pr0ck5/FreeWAF/issues/9/comments","events_url":"https://api.github.com/repos/p0pr0ck5/FreeWAF/issues/9/events","html_url":"https://github.com/p0pr0ck5/FreeWAF/issues/9","id":54823663,"number":9,"title":"Add new event logging options","user":{"login":"p0pr0ck5","id":4625425,"avatar_url":"https://avatars.githubusercontent.com/u/4625425?v=3","gravatar_id":"","url":"https://api.github.com/users/p0pr0ck5","html_url":"https://github.com/p0pr0ck5","followers_url":"https://api.github.com/users/p0pr0ck5/followers","following_url":"https://api.github.com/users/p0pr0ck5/following{/other_user}","gists_url":"https://api.github.com/users/p0pr0ck5/gists{/gist_id}","starred_url":"https://api.github.com/users/p0pr0ck5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p0pr0ck5/subscriptions","organizations_url":"https://api.github.com/users/p0pr0ck5/orgs","repos_url":"https://api.github.com/users/p0pr0ck5/repos","events_url":"https://api.github.com/users/p0pr0ck5/events{/privacy}","received_events_url":"https://api.github.com/users/p0pr0ck5/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/p0pr0ck5/FreeWAF/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"p0pr0ck5","id":4625425,"avatar_url":"https://avatars.githubusercontent.com/u/4625425?v=3","gravatar_id":"","url":"https://api.github.com/users/p0pr0ck5","html_url":"https://github.com/p0pr0ck5","followers_url":"https://api.github.com/users/p0pr0ck5/followers","following_url":"https://api.github.com/users/p0pr0ck5/following{/other_user}","gists_url":"https://api.github.com/users/p0pr0ck5/gists{/gist_id}","starred_url":"https://api.github.com/users/p0pr0ck5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p0pr0ck5/subscriptions","organizations_url":"https://api.github.com/users/p0pr0ck5/orgs","repos_url":"https://api.github.com/users/p0pr0ck5/repos","events_url":"https://api.github.com/users/p0pr0ck5/events{/privacy}","received_events_url":"https://api.github.com/users/p0pr0ck5/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/p0pr0ck5/FreeWAF/milestones/1","labels_url":"https://api.github.com/repos/p0pr0ck5/FreeWAF/milestones/1/labels","id":943537,"number":1,"title":"v0.4","description":"","creator":{"login":"p0pr0ck5","id":4625425,"avatar_url":"https://avatars.githubusercontent.com/u/4625425?v=3","gravatar_id":"","url":"https://api.github.com/users/p0pr0ck5","html_url":"https://github.com/p0pr0ck5","followers_url":"https://api.github.com/users/p0pr0ck5/followers","following_url":"https://api.github.com/users/p0pr0ck5/following{/other_user}","gists_url":"https://api.github.com/users/p0pr0ck5/gists{/gist_id}","starred_url":"https://api.github.com/users/p0pr0ck5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p0pr0ck5/subscriptions","organizations_url":"https://api.github.com/users/p0pr0ck5/orgs","repos_url":"https://api.github.com/users/p0pr0ck5/repos","events_url":"https://api.github.com/users/p0pr0ck5/events{/privacy}","received_events_url":"https://api.github.com/users/p0pr0ck5/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":3,"state":"open","created_at":"2015-01-20T13:47:17Z","updated_at":"2015-02-01T01:30:58Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-01-19T23:07:26Z","updated_at":"2015-02-01T04:47:35Z","closed_at":null,"body":"Need flexible logging destinations beyond error.log.\r\n\r\n- resty socket logger\r\n- plaintext file logger\r\n- logger settings can use set_option"},"comment":{"url":"https://api.github.com/repos/p0pr0ck5/FreeWAF/issues/comments/72351523","html_url":"https://github.com/p0pr0ck5/FreeWAF/issues/9#issuecomment-72351523","issue_url":"https://api.github.com/repos/p0pr0ck5/FreeWAF/issues/9","id":72351523,"user":{"login":"p0pr0ck5","id":4625425,"avatar_url":"https://avatars.githubusercontent.com/u/4625425?v=3","gravatar_id":"","url":"https://api.github.com/users/p0pr0ck5","html_url":"https://github.com/p0pr0ck5","followers_url":"https://api.github.com/users/p0pr0ck5/followers","following_url":"https://api.github.com/users/p0pr0ck5/following{/other_user}","gists_url":"https://api.github.com/users/p0pr0ck5/gists{/gist_id}","starred_url":"https://api.github.com/users/p0pr0ck5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p0pr0ck5/subscriptions","organizations_url":"https://api.github.com/users/p0pr0ck5/orgs","repos_url":"https://api.github.com/users/p0pr0ck5/repos","events_url":"https://api.github.com/users/p0pr0ck5/events{/privacy}","received_events_url":"https://api.github.com/users/p0pr0ck5/received_events","type":"User","site_admin":false},"created_at":"2015-02-01T04:47:35Z","updated_at":"2015-02-01T04:47:35Z","body":"nebpor,\r\n\r\nI pushed up a commit tonight that allows for configurable verbosity of event logs (9ddd3f0). It's on the 'improvements' branch if you'd like to take a look and play around with it.\r\n\r\nI also pushed up another commit (aa0cd31) that provides wrappers for UDP socket and local file logging of event logs (not debug logs, those will stay in the error_log). Socket and file logging only log the JSON blob generated from the event data. An example (using the new default minimal verbosity):\r\n\r\nroot@dev:~# cat /tmp/waf.log \r\n{\"timestamp\":1422765824,\"match\":\"id_rsa\",\"uri\":\"\\/id_rsa\",\"client\":\"172.251.161.84\",\"rule\":{\"id\":90002}}\r\n{\"timestamp\":1422765826,\"match\":\"id_rsa\",\"uri\":\"\\/id_rsa\",\"client\":\"172.251.161.84\",\"rule\":{\"id\":90002}}\r\n\r\nSocket logging is a -little- buggy in that, because lua-resty-logger-socket provides a single, global target server, we allow for multiple configurations to potentially conflict (in such a case, the global socket_logger object would be init'd with the values of whatever location configuration triggered _log_event() first). If multiple locations elect socket logging and are specified identical host/port values, no conflict will arise (the same logic follows for file logging and `event_log_target_path`).\r\n\r\nI doubt agentzh (or anyone else) is going to put effort into resty logger sharding anytime soon, so I may work on it independently in the future, but for now I'd like to close this out and focus on adding features for a v0.4 release (namely persistent storage)."}}