Created
January 22, 2013 05:31
-
-
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.
This file contains 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
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