Find waf logs that match rails routing.
Add this line to your application's Gemfile:
gem 'waffle-maker'
And then execute:
$ bundle
Or install it yourself as:
$ gem install waffle-maker
By passing the WAF log from the standard input, the log that matches the route is written to the standard output.
$ bundle exec rake waffle:filter < alert-201912.txt
Depending on the execution environment, you may need to pre-convert the character encoding of the log.
$ iconv -f CP932 -t UTF-8 < alert-201912.txt | bundle exec rake waffle:filter
with options
-f
: Specify the column number (offset) that contains the Rails route path. default is2
.-w
: Specify the column number (offset) that contains the path in the WAF log. default is2
.
Bug reports and pull requests are welcome on GitHub at https://github.com/chibicco/waffle-maker.