Created
February 25, 2016 00:19
-
-
Save stevecrozz/cb55c521711a7858dc2f 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
| # No good. Configuration options are bound to environment names | |
| if ENV['RAILS_ENV'] == 'production' || ENV['RAILS_ENV'] =~ /integ|stage/ | |
| logger = RightSupport::Log::SystemLogger.new('my_service') | |
| else | |
| logger = Logger.new(STDOUT) | |
| end |
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
| # Great! Easily controllable log location no matter what environment | |
| if ENV['LOG_LOCATION'] == 'syslog' | |
| logger = RightSupport::Log::SystemLogger.new('my_service') | |
| else | |
| logger = Logger.new(STDOUT) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment