Skip to content

Instantly share code, notes, and snippets.

@jclosure
Created January 22, 2013 05:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jclosure/4592350 to your computer and use it in GitHub Desktop.
Save jclosure/4592350 to your computer and use it in GitHub Desktop.
Log to console in Pow. Debugging by printing to console and tailing the pow project log file.
Example:
class FooController < ApplicationController
before_filter :detect_mode
def detect_mode
@mode = params['mode'] || 'normal'
Rails.logger.debug("debug::" + "mode is " + @mode) #note the use of the log filtration token.
end
...
end
Usage:
$ tail -f ~/.pow/[project_name]/log/development.log | grep debug::
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment