A Ruby gem to turn your log files into exceptions.
gem install Exceptional_Log
require "Exceptional_Log"
e = Exceptional_Log("/my_apps/logs/thin_a.log")
e.class # --> Thin_A
e.message # --> '/my_apps/logs/thin_a.log'
e.backtrace # --> Array
e.exception # --> self
e.created_at # --> File.stat(file).atime
e.to_hash # --> Hash[ :exception => ..., :message => ..., :created_at => ..., :backtrace => ... ]
Each exception is a subclass of Exceptional_Log
and is named based on the basename of
the file path.
For NGINX error logs (not access logs), try looking at the Http_Error_Log.
git clone git@github.com:da99/Exceptional_Log.git
cd Exceptional_Log
bundle update
bundle exec bacon spec/lib/main.rb
If you know of existing software that makes the above redundant, please tell me. The last thing I want to do is maintain code.