Skip to content

Instantly share code, notes, and snippets.

@cypher
Created March 22, 2010 15:56
Show Gist options
  • Save cypher/340202 to your computer and use it in GitHub Desktop.
Save cypher/340202 to your computer and use it in GitHub Desktop.
require 'my_app'
MyApp.set :logger, MyFancyLogger.new
run MyApp
require 'sinatra/base'
class MyApp < Sinatra::Base
get '/' do
# Note: I'm not sure if you can access the logger directly, but it'd be trivial to add a helper method that allows that
logger.info "Serving /…"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment