1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Change minimum (default) log level in PostgreSQL to warning.

This commit is contained in:
kennyj 2012-06-16 23:44:20 +09:00 committed by Carlos Antonio da Silva
parent 8c02918497
commit 052e415f22
5 changed files with 15 additions and 5 deletions

View file

@ -1,5 +1,11 @@
## Rails 4.0.0 (unreleased) ##
* PostgreSQL default log level is now 'warning', to bypass the noisy notice
messages. You can change the log level using the `min_messages` option
available in your config/database.yml.
*kennyj*
* Add uuid datatype support to PostgreSQL adapter. *Konstantin Shabanov*
* `update_attribute` has been removed. Use `update_column` if

View file

@ -1450,7 +1450,7 @@ module ActiveRecord
if @config[:encoding]
@connection.set_client_encoding(@config[:encoding])
end
self.client_min_messages = @config[:min_messages] if @config[:min_messages]
self.client_min_messages = @config[:min_messages] || 'warning'
self.schema_search_path = @config[:schema_search_path] || @config[:schema_order]
# Use standard-conforming strings if available so we don't have to do the E'...' dance.

View file

@ -21,6 +21,10 @@ module ActiveRecord
assert_not_nil @connection.encoding
end
def test_default_client_min_messages
assert_equal "warning", @connection.client_min_messages
end
# Ensure, we can set connection params using the example of Generic
# Query Optimizer (geqo). It is 'on' per default.
def test_connection_options

View file

@ -22,8 +22,8 @@ development:
# Minimum log levels, in increasing order:
# debug5, debug4, debug3, debug2, debug1,
# log, notice, warning, error, fatal, and panic
# The server defaults to notice.
#min_messages: warning
# Defaults to warning.
#min_messages: notice
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".

View file

@ -35,8 +35,8 @@ development:
# Minimum log levels, in increasing order:
# debug5, debug4, debug3, debug2, debug1,
# log, notice, warning, error, fatal, and panic
# The server defaults to notice.
#min_messages: warning
# Defaults to warning.
#min_messages: notice
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".