提交 052e415f 编写于 作者: K kennyj 提交者: Carlos Antonio da Silva

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

上级 8c029184
## 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
......
......@@ -1450,7 +1450,7 @@ def configure_connection
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.
......
......@@ -21,6 +21,10 @@ def test_encoding
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
......
......@@ -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".
......
......@@ -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".
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册