-
-
I like solving social problems with web and mobile technology. I also like playing funk music. README
-
iPhone Apps
-
Read About
ActionScript3 adobe flex Ajax apache authentication bash csrf custom devise Facebook API flash flex iphone javascript jquery linux marketing Music myspace MySQL objective c os x passenger Photoshop php plugin rails rounded rounded corners rspec ruby rubyonrails Ruby On Rails Software SQLite tap testing time_select user-permissions user-roles validation widget wordpress XHTML/CSS XML

Logging your Rails model (the easy way)
In one of my Rails applications, I have some pretty heavy tasks in my models. I decided to log to different files for two of my models so that I can easily make sure these tasks are performed correctly without going through my application log. I also call some of my model methods with rake tasks so it’s nice to have that action logged. The code below implements a custom log for the SomeClass model.
This will create separate logs for all of your environments. Notice that I reference the class when I log from an instance method. This is working great for me. Anyone have a better way?
If you enjoyed this post, make sure you subscribe to my RSS feed!