diff options
author | Xavier Noria <fxn@hashref.com> | 2010-12-20 20:13:34 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-12-20 20:13:34 +0100 |
commit | 880f8419c41db0aea4b7cf3abd74fe5d32fa04a7 (patch) | |
tree | 0c21b8e0829136b6fb33a136caf3085f2a78c857 /railties/guides/source/active_support_core_extensions.textile | |
parent | 0cbfd6c28d327304432f7d0c067662b5c1e41a78 (diff) | |
parent | 6909fb6cff49e11574909b55864af8673d044eb7 (diff) | |
download | rails-880f8419c41db0aea4b7cf3abd74fe5d32fa04a7.tar.gz rails-880f8419c41db0aea4b7cf3abd74fe5d32fa04a7.tar.bz2 rails-880f8419c41db0aea4b7cf3abd74fe5d32fa04a7.zip |
Merge branch 'master' of git://github.com/lifo/docrails
Diffstat (limited to 'railties/guides/source/active_support_core_extensions.textile')
-rw-r--r-- | railties/guides/source/active_support_core_extensions.textile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index 2e295aec3d..bddff1c987 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -3389,12 +3389,12 @@ Modifies the datetime format output by the formatter class associated with this <ruby> class Logger::FormatWithTime < Logger::Formatter cattr_accessor(:datetime_format) { "%Y%m%d%H%m%S" } - + def self.call(severity, timestamp, progname, msg) "#{timestamp.strftime(datetime_format)} -- #{String === msg ? msg : msg.inspect}\n" end end - + logger = Logger.new("log/development.log") logger.formatter = Logger::FormatWithTime logger.info("<- is the current time") |