Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
00236435
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
GitCode(gitcode.net)2024年7月9日维护升级公告
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
00236435
编写于
1月 05, 2012
作者:
K
Karunakar (Ruby)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Moved all the logger methods to active support logger
minor
上级
f63fff6a
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
15 addition
and
17 deletion
+15
-17
actionpack/README.rdoc
actionpack/README.rdoc
+1
-1
actionpack/test/controller/content_type_test.rb
actionpack/test/controller/content_type_test.rb
+1
-1
actionpack/test/controller/new_base/render_streaming_test.rb
actionpack/test/controller/new_base/render_streaming_test.rb
+1
-1
actionpack/test/controller/render_test.rb
actionpack/test/controller/render_test.rb
+2
-2
actionpack/test/controller/render_xml_test.rb
actionpack/test/controller/render_xml_test.rb
+1
-1
actionpack/test/dispatch/request/json_params_parsing_test.rb
actionpack/test/dispatch/request/json_params_parsing_test.rb
+1
-1
actionpack/test/dispatch/request/xml_params_parsing_test.rb
actionpack/test/dispatch/request/xml_params_parsing_test.rb
+1
-1
actionpack/test/template/template_test.rb
actionpack/test/template/template_test.rb
+1
-1
activerecord/README.rdoc
activerecord/README.rdoc
+1
-1
activerecord/lib/active_record/railtie.rb
activerecord/lib/active_record/railtie.rb
+1
-1
activeresource/test/abstract_unit.rb
activeresource/test/abstract_unit.rb
+2
-3
activesupport/test/buffered_logger_test.rb
activesupport/test/buffered_logger_test.rb
+0
-1
activesupport/test/caching_test.rb
activesupport/test/caching_test.rb
+2
-2
未找到文件。
actionpack/README.rdoc
浏览文件 @
00236435
...
...
@@ -206,7 +206,7 @@ A short rundown of some of the major features:
You specify a logger through a class method, such as:
ActionController::Base.logger = Logger.new("Application Log")
ActionController::Base.logger =
ActiveSupport::
Logger.new("Application Log")
ActionController::Base.logger = Log4r::Logger.new("Application Log")
...
...
actionpack/test/controller/content_type_test.rb
浏览文件 @
00236435
...
...
@@ -59,7 +59,7 @@ def setup
super
# enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
# a more accurate simulation of what happens in "real life".
@controller
.
logger
=
Logger
.
new
(
nil
)
@controller
.
logger
=
ActiveSupport
::
Logger
.
new
(
nil
)
end
# :ported:
...
...
actionpack/test/controller/new_base/render_streaming_test.rb
浏览文件 @
00236435
...
...
@@ -85,7 +85,7 @@ class StreamingTest < Rack::TestCase
test
"rendering with template exception logs the exception"
do
io
=
StringIO
.
new
_old
,
ActionController
::
Base
.
logger
=
ActionController
::
Base
.
logger
,
Logger
.
new
(
io
)
_old
,
ActionController
::
Base
.
logger
=
ActionController
::
Base
.
logger
,
ActiveSupport
::
Logger
.
new
(
io
)
begin
get
"/render_streaming/basic/template_exception"
...
...
actionpack/test/controller/render_test.rb
浏览文件 @
00236435
...
...
@@ -696,7 +696,7 @@ def setup
# enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
# a more accurate simulation of what happens in "real life".
super
@controller
.
logger
=
Logger
.
new
(
nil
)
@controller
.
logger
=
ActiveSupport
::
Logger
.
new
(
nil
)
@request
.
host
=
"www.nextangle.com"
end
...
...
@@ -907,7 +907,7 @@ def test_access_to_request_in_view
def
test_access_to_logger_in_view
get
:accessing_logger_in_template
assert_equal
"Logger"
,
@response
.
body
assert_equal
"
ActiveSupport::
Logger"
,
@response
.
body
end
# :ported:
...
...
actionpack/test/controller/render_xml_test.rb
浏览文件 @
00236435
...
...
@@ -48,7 +48,7 @@ def setup
# enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
# a more accurate simulation of what happens in "real life".
super
@controller
.
logger
=
Logger
.
new
(
nil
)
@controller
.
logger
=
ActiveSupport
::
Logger
.
new
(
nil
)
@request
.
host
=
"www.nextangle.com"
end
...
...
actionpack/test/dispatch/request/json_params_parsing_test.rb
浏览文件 @
00236435
...
...
@@ -34,7 +34,7 @@ def teardown
with_test_routing
do
output
=
StringIO
.
new
json
=
"[
\"
person]
\"
: {
\"
name
\"
:
\"
David
\"
}}"
post
"/parse"
,
json
,
{
'CONTENT_TYPE'
=>
'application/json'
,
'action_dispatch.show_exceptions'
=>
true
,
'action_dispatch.logger'
=>
Logger
.
new
(
output
)}
post
"/parse"
,
json
,
{
'CONTENT_TYPE'
=>
'application/json'
,
'action_dispatch.show_exceptions'
=>
true
,
'action_dispatch.logger'
=>
ActiveSupport
::
Logger
.
new
(
output
)}
assert_response
:error
output
.
rewind
&&
err
=
output
.
read
assert
err
=~
/Error occurred while parsing request parameters/
...
...
actionpack/test/dispatch/request/xml_params_parsing_test.rb
浏览文件 @
00236435
...
...
@@ -56,7 +56,7 @@ def call(env)
with_test_routing
do
output
=
StringIO
.
new
xml
=
"<person><name>David</name><avatar type='file' name='me.jpg' content_type='image/jpg'>
#{
::
Base64
.
encode64
(
'ABC'
)
}
</avatar></pineapple>"
post
"/parse"
,
xml
,
default_headers
.
merge
(
'action_dispatch.show_exceptions'
=>
true
,
'action_dispatch.logger'
=>
Logger
.
new
(
output
))
post
"/parse"
,
xml
,
default_headers
.
merge
(
'action_dispatch.show_exceptions'
=>
true
,
'action_dispatch.logger'
=>
ActiveSupport
::
Logger
.
new
(
output
))
assert_response
:error
output
.
rewind
&&
err
=
output
.
read
assert
err
=~
/Error occurred while parsing request parameters/
...
...
actionpack/test/template/template_test.rb
浏览文件 @
00236435
...
...
@@ -37,7 +37,7 @@ def lookup_context
end
def
logger
Logger
.
new
(
STDERR
)
ActiveSupport
::
Logger
.
new
(
STDERR
)
end
def
my_buffer
...
...
activerecord/README.rdoc
浏览文件 @
00236435
...
...
@@ -143,7 +143,7 @@ A short rundown of some of the major features:
* Logging support for Log4r[http://log4r.sourceforge.net] and Logger[http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc].
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.logger =
ActiveSupport::
Logger.new(STDOUT)
ActiveRecord::Base.logger = Log4r::Logger.new("Application Log")
...
...
activerecord/lib/active_record/railtie.rb
浏览文件 @
00236435
...
...
@@ -38,7 +38,7 @@ class Railtie < Rails::Railtie
# first time. Also, make it output to STDERR.
console
do
|
app
|
require
"active_record/railties/console_sandbox"
if
app
.
sandbox?
ActiveRecord
::
Base
.
logger
=
Logger
.
new
(
STDERR
)
ActiveRecord
::
Base
.
logger
=
ActiveSupport
::
Logger
.
new
(
STDERR
)
end
initializer
"active_record.initialize_timezone"
do
...
...
activeresource/test/abstract_unit.rb
浏览文件 @
00236435
...
...
@@ -7,11 +7,10 @@
require
'active_resource'
require
'active_support'
require
'active_support/test_case'
require
'setter_trap'
require
'active_support/logger'
require
'logger'
ActiveResource
::
Base
.
logger
=
Logger
.
new
(
"
#{
File
.
dirname
(
__FILE__
)
}
/debug.log"
)
ActiveResource
::
Base
.
logger
=
ActiveSupport
::
Logger
.
new
(
"
#{
File
.
dirname
(
__FILE__
)
}
/debug.log"
)
def
setup_response
matz_hash
=
{
'person'
=>
{
:id
=>
1
,
:name
=>
'Matz'
}
}
...
...
activesupport/test/buffered_logger_test.rb
浏览文件 @
00236435
...
...
@@ -3,7 +3,6 @@
require
'stringio'
require
'fileutils'
require
'tempfile'
require
'active_support/buffered_logger'
require
'active_support/testing/deprecation'
class
BufferedLoggerTest
<
Test
::
Unit
::
TestCase
...
...
activesupport/test/caching_test.rb
浏览文件 @
00236435
...
...
@@ -681,7 +681,7 @@ def setup
@data
=
@cache
.
instance_variable_get
(
:@data
)
@cache
.
clear
@cache
.
silence!
@cache
.
logger
=
Logger
.
new
(
"/dev/null"
)
@cache
.
logger
=
ActiveSupport
::
Logger
.
new
(
"/dev/null"
)
end
include
CacheStoreBehavior
...
...
@@ -786,7 +786,7 @@ def setup
@cache
=
ActiveSupport
::
Cache
.
lookup_store
(
:memory_store
)
@buffer
=
StringIO
.
new
@cache
.
logger
=
Logger
.
new
(
@buffer
)
@cache
.
logger
=
ActiveSupport
::
Logger
.
new
(
@buffer
)
end
def
test_logging
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录