Skip to content

Commit 48ca876

Browse files
author
Nathan Keyes
committed
de-escalate unnecessary logger warnings
1 parent 99cd0c0 commit 48ca876

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

app/models/cms/view_context.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def initialize(controller, attributes_to_assign)
3939

4040
# We want content_for to be called on the controller's view, not this inner view
4141
def content_for(name, content=nil, &block)
42-
Rails.logger.warn "content_for(#{name}, #{content}, block) called."
42+
Rails.logger.info "content_for(#{name}, #{content}, block) called."
4343
@controller.instance_variable_get("@template").content_for(name, content, &block)
4444
end
4545

lib/cms/acts/content_page.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def page_title=(title)
5252
# Before filter that determines if the current user can access a specific section.
5353
def check_access_to_section
5454
user = current_user
55-
logger.warn "Checking that current_user '#{user.login}' has access to view section with path '#{self.class.in_section}'."
55+
logger.info "Checking that current_user '#{user.login}' has access to view section with path '#{self.class.in_section}'."
5656
unless user.able_to_view?(self.class.in_section)
5757
store_location
5858
raise Cms::Errors::AccessDenied
@@ -75,7 +75,7 @@ module ClassMethods
7575
# ...
7676
#
7777
def requires_permission_for_section(path, options={})
78-
logger.warn "Setting path #{path}"
78+
logger.info "Setting path #{path}"
7979
@section_path = path
8080
before_filter :check_access_to_section, options
8181
end

lib/cms/behaviors/attaching.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def multiple_attachments
294294
#
295295
# ActiveRecord Callback
296296
def save_associated_attachments
297-
logger.warn "save_associated_attachments #{attachments}"
297+
logger.info "save_associated_attachments #{attachments}"
298298
attachments.each do |a|
299299
a.save if a.changed?
300300
end

test/unit/models/page_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,10 +566,10 @@ def setup
566566
end
567567

568568
test "Creating a new block to a page should update all existing connectors to the new page version." do
569-
Rails.logger.warn "Creating a new connector"
569+
Rails.logger.info "Creating a new connector"
570570
@page.create_connector(create(:html_block), "main")
571571
expected_version = 3
572-
Rails.logger.warn "Done"
572+
Rails.logger.info "Done"
573573
connectors = @page.connectors.for_page_version(expected_version)
574574
assert_equal expected_version, connectors[0].page_version, "There should be two connectors with the same version as the page"
575575
assert_equal expected_version, connectors[1].page_version

0 commit comments

Comments
 (0)