Files
edx-platform/openedx/core/djangoapps/schedules/utils.py
Tyler Hallada 9876f597e6 Refactor common task querying into a separate func
Address some of Cale's PR comments

Combine query functions into one. No debug logging

Pull int variables out into static class variables

Mixin needs to call super __init__ too

Remove multi-course copy from upgrade reminder

Address Cale's round 2 comments
2017-10-06 13:36:13 -04:00

15 lines
509 B
Python

import logging
LOG = logging.getLogger(__name__)
# TODO: consider using a LoggerAdapter instead of this mixin:
# https://docs.python.org/2/library/logging.html#logging.LoggerAdapter
class PrefixedDebugLoggerMixin(object):
def __init__(self, *args, **kwargs):
super(PrefixedDebugLoggerMixin, self).__init__(*args, **kwargs)
self.log_prefix = self.__class__.__name__
def log_debug(self, message, *args, **kwargs):
LOG.debug(self.log_prefix + ': ' + message, *args, **kwargs)