diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-06 17:18:34 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-06 17:18:34 +0000 |
commit | 911614df6eb4ea1f19c71aea57b1aea0b243c73a (patch) | |
tree | 9bbd04c7d1a9d8b66b98d689bfef1114b6058269 /activerecord/lib/active_record/base.rb | |
parent | 7ba3903db6e8a0e0ddc737562742c7213c32a9d7 (diff) | |
download | rails-911614df6eb4ea1f19c71aea57b1aea0b243c73a.tar.gz rails-911614df6eb4ea1f19c71aea57b1aea0b243c73a.tar.bz2 rails-911614df6eb4ea1f19c71aea57b1aea0b243c73a.zip |
Added ActiveRecord::Base.colorize_logging to control whether to use colors in logs or not (on by default)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@860 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 2725e3c7f5..b198f0a636 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -264,6 +264,12 @@ module ActiveRecord #:nodoc: cattr_accessor :pluralize_table_names @@pluralize_table_names = true + # Determines whether or not to use ANSI codes to colorize the logging statements committed by the connection adapter. These colors + # makes it much easier to overview things during debugging (when used through a reader like +tail+ and on a black background), but + # may complicate matters if you use software like syslog. This is true, by default. + cattr_accessor :colorize_logging + @@colorize_logging = true + # Determines whether to use Time.local (using :local) or Time.utc (using :utc) when pulling dates and times from the database. # This is set to :local by default. cattr_accessor :default_timezone |