You are currently browsing the tag archive for the ‘Sinatra’ tag.
Writes to console and outputs to log…
error_logger = Logger.new('log/errors.log')
error do
e = request.env['sinatra.error']
info = "Application error\n#{e}\n#{e.backtrace.join("\n")}"
error_logger.info info
Kernel.puts info
'Application error'
end
Just wanted to share our setup, as reminder and help for others
(do not forget to create a tmp and public folder inside your projects folder)
