Saturday, February 9, 2008

Logger in rails

By default log files are created in the log directory. But if you want to control you logs then you can specify it in the config/environment.rb file

# Include your application configuration below
#Added to include the logging capability in the code
MY_LOGGER ="c:/logging_rail.log")
MY_LOGGER.level = Logger::DEBUG

From the code use lgger as"-----------------------------");"INFO: Inside function");"INFO: At:"+1.hour.from_now.to_s);

No comments: