Created
February 7, 2018 10:27
-
-
Save srMarquinho/4d2f3ce7ea773027666d1215484966ad to your computer and use it in GitHub Desktop.
custom rails logger
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
class MyLog | |
def self.debug(message=nil) | |
@my_log ||= Logger.new("#{Rails.root}/log/my.log") | |
@my_log.debug(message) unless message.nil? | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment