aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorPeter Boling <peter.boling@gmail.com>2015-07-17 13:23:59 -0700
committerPeter Boling <peter.boling@gmail.com>2015-07-17 13:23:59 -0700
commitbec65fa261b9803c19edbbe9dc89836e1edf78c7 (patch)
tree62c238adfce951a29af7c9fd0be30d72db3d5e64 /activesupport/lib
parent2c79122c0bbd61dcef12b95c80e025490d5a9783 (diff)
downloadrails-bec65fa261b9803c19edbbe9dc89836e1edf78c7.tar.gz
rails-bec65fa261b9803c19edbbe9dc89836e1edf78c7.tar.bz2
rails-bec65fa261b9803c19edbbe9dc89836e1edf78c7.zip
Improve sql logging coloration in `ActiveRecord::LogSubscriber`.
- Improves coloring for statements like: # Become WHITE SELECT * FROM ( SELECT * FROM mytable FOR UPDATE ) ss WHERE col1 = 5; LOCK TABLE table_name IN ACCESS EXCLUSIVE MODE; # Becomes RED ROLLBACK - Reinstates the coloration of the `payload[:name]`. Instead of simple alternating colors, adds meaning: - `MAGENTA` for `"SQL"` or `blank?` payload names - `CYAN` for Model Load/Exists - Introduces specs for sql coloration. - Introduces specs for payload name coloration. GH#20885
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/log_subscriber.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/log_subscriber.rb b/activesupport/lib/active_support/log_subscriber.rb
index e95dc5a866..e782cd2d4b 100644
--- a/activesupport/lib/active_support/log_subscriber.rb
+++ b/activesupport/lib/active_support/log_subscriber.rb
@@ -95,7 +95,7 @@ module ActiveSupport
METHOD
end
- # Set color by using a string or one of the defined constants. If a third
+ # Set color by using a symbol or one of the defined constants. If a third
# option is set to +true+, it also adds bold to the string. This is based
# on the Highline implementation and will automatically append CLEAR to the
# end of the returned String.