Commit 136bcb29 by Julia Hansbrough

Merge pull request #3934 from edx/flowerhack/handout-error-logs

Removed excessive logging
parents a32e4d58 e1688e2a
...@@ -187,7 +187,7 @@ def get_course_about_section(course, section_key): ...@@ -187,7 +187,7 @@ def get_course_about_section(course, section_key):
loc, loc,
field_data_cache, field_data_cache,
course.id, course.id,
not_found_ok=True, log_if_not_found=False,
wrap_xmodule_display=False, wrap_xmodule_display=False,
static_asset_path=course.static_asset_path static_asset_path=course.static_asset_path
) )
...@@ -241,6 +241,7 @@ def get_course_info_section(request, course, section_key): ...@@ -241,6 +241,7 @@ def get_course_info_section(request, course, section_key):
usage_key, usage_key,
field_data_cache, field_data_cache,
course.id, course.id,
log_if_not_found=False,
wrap_xmodule_display=False, wrap_xmodule_display=False,
static_asset_path=course.static_asset_path static_asset_path=course.static_asset_path
) )
......
...@@ -140,7 +140,7 @@ def toc_for_course(user, request, course, active_chapter, active_section, field_ ...@@ -140,7 +140,7 @@ def toc_for_course(user, request, course, active_chapter, active_section, field_
def get_module(user, request, usage_key, field_data_cache, def get_module(user, request, usage_key, field_data_cache,
position=None, not_found_ok=False, wrap_xmodule_display=True, position=None, log_if_not_found=True, wrap_xmodule_display=True,
grade_bucket_type=None, depth=0, grade_bucket_type=None, depth=0,
static_asset_path=''): static_asset_path=''):
""" """
...@@ -152,11 +152,13 @@ def get_module(user, request, usage_key, field_data_cache, ...@@ -152,11 +152,13 @@ def get_module(user, request, usage_key, field_data_cache,
- user : User for whom we're getting the module - user : User for whom we're getting the module
- request : current django HTTPrequest. Note: request.user isn't used for anything--all auth - request : current django HTTPrequest. Note: request.user isn't used for anything--all auth
and such works based on user. and such works based on user.
- location : A Location-like object identifying the module to load - usage_key : A UsageKey object identifying the module to load
- field_data_cache : a FieldDataCache - field_data_cache : a FieldDataCache
- course_id : the course_id in the context of which to load module
- position : extra information from URL for user-specified - position : extra information from URL for user-specified
position within module position within module
- log_if_not_found : If this is True, we log a debug message if we cannot find the requested xmodule.
- wrap_xmodule_display : If this is True, wrap the output display in a single div to allow for the
XModule javascript to be bound correctly
- depth : number of levels of descendents to cache when loading this module. - depth : number of levels of descendents to cache when loading this module.
None means cache all descendents None means cache all descendents
- static_asset_path : static asset path to use (overrides descriptor's value); needed - static_asset_path : static asset path to use (overrides descriptor's value); needed
...@@ -176,9 +178,10 @@ def get_module(user, request, usage_key, field_data_cache, ...@@ -176,9 +178,10 @@ def get_module(user, request, usage_key, field_data_cache,
grade_bucket_type=grade_bucket_type, grade_bucket_type=grade_bucket_type,
static_asset_path=static_asset_path) static_asset_path=static_asset_path)
except ItemNotFoundError: except ItemNotFoundError:
if not not_found_ok: if log_if_not_found:
log.exception("Error in get_module") log.debug("Error in get_module: ItemNotFoundError")
return None return None
except: except:
# Something has gone terribly wrong, but still not letting it turn into a 500. # Something has gone terribly wrong, but still not letting it turn into a 500.
log.exception("Error in get_module") log.exception("Error in get_module")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment