From e26fc08d2b08efe7e6409159ad29db942eee63d1 Mon Sep 17 00:00:00 2001 From: David Baumgold <david@davidbaumgold.com> Date: Mon, 2 Dec 2013 14:28:00 -0500 Subject: [PATCH] Update logging.getLogger() calls to use edx instead of mitx --- common/djangoapps/external_auth/views.py | 2 +- common/djangoapps/student/models.py | 2 +- common/djangoapps/student/views.py | 2 +- common/lib/xmodule/xmodule/capa_module.py | 2 +- common/lib/xmodule/xmodule/combined_open_ended_module.py | 2 +- common/lib/xmodule/xmodule/conditional_module.py | 2 +- common/lib/xmodule/xmodule/graders.py | 2 +- common/lib/xmodule/xmodule/html_module.py | 2 +- common/lib/xmodule/xmodule/modulestore/__init__.py | 2 +- .../open_ended_grading_classes/combined_open_ended_modulev1.py | 2 +- .../xmodule/open_ended_grading_classes/open_ended_module.py | 2 +- .../xmodule/open_ended_grading_classes/openendedchild.py | 3 +-- .../open_ended_grading_classes/self_assessment_module.py | 2 +- common/lib/xmodule/xmodule/randomize_module.py | 2 +- lms/djangoapps/courseware/grades.py | 2 +- lms/djangoapps/courseware/views.py | 2 +- lms/djangoapps/licenses/models.py | 2 +- lms/djangoapps/licenses/views.py | 2 +- lms/djangoapps/lms_migration/migrate.py | 2 +- lms/djangoapps/psychometrics/psychoanalyze.py | 2 +- 20 files changed, 20 insertions(+), 21 deletions(-) diff --git a/common/djangoapps/external_auth/views.py b/common/djangoapps/external_auth/views.py index 2784737eea3..42d0f2bf89f 100644 --- a/common/djangoapps/external_auth/views.py +++ b/common/djangoapps/external_auth/views.py @@ -50,7 +50,7 @@ from xmodule.course_module import CourseDescriptor from xmodule.modulestore import Location from xmodule.modulestore.exceptions import ItemNotFoundError -log = logging.getLogger("mitx.external_auth") +log = logging.getLogger("edx.external_auth") AUDIT_LOG = logging.getLogger("audit") SHIBBOLETH_DOMAIN_PREFIX = 'shib:' diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index 1ed6126e9b6..734b3a1ec46 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -702,7 +702,7 @@ def update_user_information(sender, instance, created, **kwargs): cc_user = cc.User.from_django_user(instance) cc_user.save() except Exception as e: - log = logging.getLogger("mitx.discussion") + log = logging.getLogger("edx.discussion") log.error(unicode(e)) log.error("update user info to discussion failed for user with id: " + str(instance.id)) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 96ccba46e68..878630272a8 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -72,7 +72,7 @@ from pytz import UTC from util.json_request import JsonResponse -log = logging.getLogger("mitx.student") +log = logging.getLogger("edx.student") AUDIT_LOG = logging.getLogger("audit") Article = namedtuple('Article', 'title url author image deck publication publish_date') diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index cf6c2e3dce1..b78e2a4a501 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -24,7 +24,7 @@ from .fields import Timedelta, Date from django.utils.timezone import UTC from django.utils.translation import ugettext as _ -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") # Generate this many different variants of problems with rerandomize=per_student diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 2eb8585d854..960db4db7d1 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -11,7 +11,7 @@ from collections import namedtuple from .fields import Date, Timedelta import textwrap -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") V1_SETTINGS_ATTRIBUTES = [ "display_name", diff --git a/common/lib/xmodule/xmodule/conditional_module.py b/common/lib/xmodule/xmodule/conditional_module.py index b7a48fb82a1..82483433718 100644 --- a/common/lib/xmodule/xmodule/conditional_module.py +++ b/common/lib/xmodule/xmodule/conditional_module.py @@ -15,7 +15,7 @@ from xblock.fields import Scope, List from xmodule.modulestore.exceptions import ItemNotFoundError -log = logging.getLogger('mitx.' + __name__) +log = logging.getLogger('edx.' + __name__) class ConditionalFields(object): diff --git a/common/lib/xmodule/xmodule/graders.py b/common/lib/xmodule/xmodule/graders.py index 10ef86ebdc0..d51e1414c34 100644 --- a/common/lib/xmodule/xmodule/graders.py +++ b/common/lib/xmodule/xmodule/graders.py @@ -6,7 +6,7 @@ import sys from collections import namedtuple -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") # This is a tuple for holding scores, either from problems or sections. # Section either indicates the name of the problem or the name of the section diff --git a/common/lib/xmodule/xmodule/html_module.py b/common/lib/xmodule/xmodule/html_module.py index 25cebe8e420..73b5baf2d6c 100644 --- a/common/lib/xmodule/xmodule/html_module.py +++ b/common/lib/xmodule/xmodule/html_module.py @@ -16,7 +16,7 @@ from xmodule.xml_module import XmlDescriptor, name_to_pathname import textwrap from xmodule.contentstore.content import StaticContent -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") class HtmlFields(object): diff --git a/common/lib/xmodule/xmodule/modulestore/__init__.py b/common/lib/xmodule/xmodule/modulestore/__init__.py index 7ed33e56731..ebec6d6ee8b 100644 --- a/common/lib/xmodule/xmodule/modulestore/__init__.py +++ b/common/lib/xmodule/xmodule/modulestore/__init__.py @@ -13,7 +13,7 @@ from abc import ABCMeta, abstractmethod from .exceptions import InvalidLocationError, InsufficientSpecificationError from xmodule.errortracker import make_error_tracker -log = logging.getLogger('mitx.' + 'modulestore') +log = logging.getLogger('edx.modulestore') SPLIT_MONGO_MODULESTORE_TYPE = 'split' MONGO_MODULESTORE_TYPE = 'mongo' diff --git a/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py b/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py index 72915eb7b36..2c02833baa5 100644 --- a/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py +++ b/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py @@ -13,7 +13,7 @@ from .combined_open_ended_rubric import CombinedOpenEndedRubric, GRADER_TYPE_IMA from xmodule.open_ended_grading_classes.peer_grading_service import PeerGradingService, MockPeerGradingService, GradingServiceError from xmodule.open_ended_grading_classes.openendedchild import OpenEndedChild -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") # Set the default number of max attempts. Should be 1 for production # Set higher for debugging/testing diff --git a/common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py b/common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py index d020987fdf6..680ed031d12 100644 --- a/common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py +++ b/common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py @@ -23,7 +23,7 @@ from pytz import UTC from .combined_open_ended_rubric import CombinedOpenEndedRubric -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") class OpenEndedModule(openendedchild.OpenEndedChild): diff --git a/common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py b/common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py index 6b98744ccd4..2d6ba841183 100644 --- a/common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py +++ b/common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py @@ -11,11 +11,10 @@ import controller_query_service from datetime import datetime from pytz import UTC -import requests from boto.s3.connection import S3Connection from boto.s3.key import Key -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") # Set the default number of max attempts. Should be 1 for production # Set higher for debugging/testing diff --git a/common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py b/common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py index 45295fd09f7..cb9d1e72c5f 100644 --- a/common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py +++ b/common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py @@ -9,7 +9,7 @@ import openendedchild from .combined_open_ended_rubric import CombinedOpenEndedRubric -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") class SelfAssessmentModule(openendedchild.OpenEndedChild): diff --git a/common/lib/xmodule/xmodule/randomize_module.py b/common/lib/xmodule/xmodule/randomize_module.py index 71d23012d1a..56b7c079aaf 100644 --- a/common/lib/xmodule/xmodule/randomize_module.py +++ b/common/lib/xmodule/xmodule/randomize_module.py @@ -9,7 +9,7 @@ from lxml import etree from xblock.fields import Scope, Integer from xblock.fragment import Fragment -log = logging.getLogger('mitx.' + __name__) +log = logging.getLogger('edx.' + __name__) class RandomizeFields(object): diff --git a/lms/djangoapps/courseware/grades.py b/lms/djangoapps/courseware/grades.py index f17a3486d53..49b67ecc40a 100644 --- a/lms/djangoapps/courseware/grades.py +++ b/lms/djangoapps/courseware/grades.py @@ -22,7 +22,7 @@ from xmodule.graders import Score from .models import StudentModule from .module_render import get_module, get_module_for_descriptor -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") def yield_module_descendents(module): diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 0608e2c7598..fcf12262956 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -38,7 +38,7 @@ from xmodule.modulestore.search import path_to_location from xmodule.course_module import CourseDescriptor import shoppingcart -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") template_imports = {'urllib': urllib} diff --git a/lms/djangoapps/licenses/models.py b/lms/djangoapps/licenses/models.py index db24126a8e2..f91048d269e 100644 --- a/lms/djangoapps/licenses/models.py +++ b/lms/djangoapps/licenses/models.py @@ -4,7 +4,7 @@ from django.db import models, transaction from student.models import User -log = logging.getLogger("mitx.licenses") +log = logging.getLogger("edx.licenses") class CourseSoftware(models.Model): diff --git a/lms/djangoapps/licenses/views.py b/lms/djangoapps/licenses/views.py index 42ecb9ecf19..657d6cd0c7e 100644 --- a/lms/djangoapps/licenses/views.py +++ b/lms/djangoapps/licenses/views.py @@ -16,7 +16,7 @@ from licenses.models import CourseSoftware from licenses.models import get_courses_licenses, get_or_create_license, get_license -log = logging.getLogger("mitx.licenses") +log = logging.getLogger("edx.licenses") License = namedtuple('License', 'software serial') diff --git a/lms/djangoapps/lms_migration/migrate.py b/lms/djangoapps/lms_migration/migrate.py index 18d9a510174..d00030bd43c 100644 --- a/lms/djangoapps/lms_migration/migrate.py +++ b/lms/djangoapps/lms_migration/migrate.py @@ -17,7 +17,7 @@ try: except ImportError: from django.contrib.csrf.middleware import csrf_exempt -log = logging.getLogger("mitx.lms_migrate") +log = logging.getLogger("edx.lms_migrate") LOCAL_DEBUG = True ALLOWED_IPS = settings.LMS_MIGRATION_ALLOWED_IPS diff --git a/lms/djangoapps/psychometrics/psychoanalyze.py b/lms/djangoapps/psychometrics/psychoanalyze.py index c6e66445a48..dac10e0b070 100644 --- a/lms/djangoapps/psychometrics/psychoanalyze.py +++ b/lms/djangoapps/psychometrics/psychoanalyze.py @@ -18,7 +18,7 @@ from psychometrics.models import PsychometricData from courseware.models import StudentModule from pytz import UTC -log = logging.getLogger("mitx.psychometrics") +log = logging.getLogger("edx.psychometrics") #db = "ocwtutor" # for debugging #db = "default" -- GitLab