Skip to content
Snippets Groups Projects
Unverified Commit 78c73595 authored by Cory Lee's avatar Cory Lee Committed by GitHub
Browse files

Merge pull request #19127 from edx/coryleeio/reduce_logging_volume

Removing unnecessary log statements
parents f43aa07a 305167cd
Branches
Tags
No related merge requests found
......@@ -185,10 +185,7 @@ class LibraryContentModule(LibraryContentFields, XModule, StudioEditableModule):
else:
raise NotImplementedError("Unsupported mode.")
selected |= added_block_keys
# TODO: used for temporary logging for EDUCATOR-1290
cls._log_if_mit_supply_chain(
valid_block_keys, selected, invalid_block_keys, overlimit_block_keys, added_block_keys, children
)
return {
'selected': selected,
'invalid': invalid_block_keys,
......@@ -196,32 +193,6 @@ class LibraryContentModule(LibraryContentFields, XModule, StudioEditableModule):
'added': added_block_keys,
}
@staticmethod
def _log_if_mit_supply_chain(
valid_block_keys, selected, invalid_block_keys, overlimit_block_keys, added_block_keys, children
):
"""
Helper method to debug case where random block_keys are not assigned for particular courses.
TODO: Delete this before closing EDUCATOR-1290
"""
if not selected:
return
course_key = ''
if children:
course_key = children[0].course_key
if selected and "MITx+CTL" in text_type(course_key):
logger.info(
"EDUCATOR-1290: LibraryContentModule.make_selection executed for course {0}: "
"valid_block_keys: {1} | selected: {2} | invalid: {3} | overlimit: {4} | added: {5}".format(
text_type(course_key),
valid_block_keys,
selected,
invalid_block_keys,
overlimit_block_keys,
added_block_keys
)
)
def _publish_event(self, event_name, result, **kwargs):
"""
Helper method to publish an event for analytics purposes
......
......@@ -173,8 +173,6 @@ class BlockStructureStore(object):
if not serialized_data:
logger.info("BlockStructure: Not found in cache; %s.", bs_model)
raise BlockStructureNotFound(bs_model.data_usage_key)
else:
logger.info("BlockStructure: Read from cache; %s, size: %d", bs_model, len(serialized_data))
return serialized_data
def _get_from_store(self, bs_model):
......
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