added Rails-like logging
fixed some bugs in the Rails logging
cleaned up the Rails logging