>> Time.now
>> "Mon May 12 15:15:46 +0700 2008"
>> Time.now.xmlschema(6)
>> "2008-05-12T15:17:14.609000+07:00"
>> Time.now.to_yaml
>> "--- 2008-05-12 15:23:26.843000+07:00"
~!~ Now Let we implement it to our log ~!~
Pindahkan kursor dirimu ke /config/environment.rb, taro ini di baris paling
akhir :
class Logger
def format_message(severity, timestamp, progname, msg)
"#{Time.now.to_yaml} (#{$$}) #{msg}\n"
end
end
Nah sekarang setiap barisnya log kamu tercatat dalam microsecond, ini membantu
dalam mentrace transaksi. Semoga Bermanfaat & klo ada yang lebih bagus dishare
yah ke sini.
Sincerely,
Reinhart
http://teapoci.blogspot.com
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ