Skip to content

Instantly share code, notes, and snippets.

@indrode
Created July 21, 2015 09:20
Show Gist options
  • Save indrode/96d7ad25ae2dd600a011 to your computer and use it in GitHub Desktop.
Save indrode/96d7ad25ae2dd600a011 to your computer and use it in GitHub Desktop.
Simple Sinatra logging to file.
# simple Sinatra logging to file
require 'sinatra'
require 'logger'
configure do
LOGGER = Logger.new("some.log")
enable :logging, :dump_errors
set :raise_errors, true
end
get '/test'
LOGGER.info('ok')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment