Created
March 22, 2010 15:56
-
-
Save cypher/340202 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'my_app' | |
MyApp.set :logger, MyFancyLogger.new | |
run MyApp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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