Self hosted FLOSS fitness/workout, nutrition and weight tracker
Use __name__ to get the current logger
Roland Geiderb0fc66695956
diff --git a/wger/config/models.py b/wger/config/models.pyindex c51231b9e..5c27255cb 100644--- a/wger/config/models.py+++ b/wger/config/models.py@@ -30,7 +30,7 @@ from wger.utils.cache import delete_template_fragment_cachefrom wger.utils.cache import cache_mapper-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)@python_2_unicode_compatiblediff --git a/wger/config/views/gym_config.py b/wger/config/views/gym_config.pyindex ab4616490..700abfa85 100644--- a/wger/config/views/gym_config.py+++ b/wger/config/views/gym_config.py@@ -25,7 +25,7 @@ from wger.config.models import GymConfigfrom wger.utils.generic_views import WgerFormMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class GymConfigUpdateView(WgerFormMixin, UpdateView):diff --git a/wger/config/views/language_config.py b/wger/config/views/language_config.pyindex 5e840d07e..f7311ba91 100644--- a/wger/config/views/language_config.py+++ b/wger/config/views/language_config.py@@ -25,7 +25,7 @@ from wger.config.models import LanguageConfigfrom wger.utils.generic_views import WgerFormMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class LanguageConfigUpdateView(WgerFormMixin, UpdateView):diff --git a/wger/config/views/languages.py b/wger/config/views/languages.pyindex e9d6b944e..87ca7fe51 100644--- a/wger/config/views/languages.py+++ b/wger/config/views/languages.py@@ -33,7 +33,7 @@ from wger.utils.generic_views import WgerFormMixinfrom wger.utils.generic_views import WgerPermissionMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class LanguageListView(WgerPermissionMixin, ListView):diff --git a/wger/core/demo.py b/wger/core/demo.pyindex 181a272e5..1dd0786ef 100644--- a/wger/core/demo.py+++ b/wger/core/demo.py@@ -41,7 +41,7 @@ from wger.nutrition.models import IngredientWeightUnitfrom wger.utils.language import load_language-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)def create_temporary_user():diff --git a/wger/core/tests/test_apikey.py b/wger/core/tests/test_apikey.pyindex 2175f52e8..d619f1747 100644--- a/wger/core/tests/test_apikey.py+++ b/wger/core/tests/test_apikey.py@@ -21,7 +21,7 @@ from rest_framework.authtoken.models import Tokenfrom wger.manager.tests.testcase import WorkoutManagerTestCase-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class ApiKeyTestCase(WorkoutManagerTestCase):diff --git a/wger/core/tests/test_change_password.py b/wger/core/tests/test_change_password.pyindex 2e4c2bec2..41101e2bb 100644--- a/wger/core/tests/test_change_password.py+++ b/wger/core/tests/test_change_password.py@@ -19,7 +19,7 @@ from django.contrib.auth.models import Userfrom wger.manager.tests.testcase import WorkoutManagerTestCase-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class ChangePasswordTestCase(WorkoutManagerTestCase):diff --git a/wger/core/tests/test_delete_user.py b/wger/core/tests/test_delete_user.pyindex a744e9066..637a1587a 100644--- a/wger/core/tests/test_delete_user.py+++ b/wger/core/tests/test_delete_user.py@@ -25,7 +25,7 @@ from wger.utils.constants import TWOPLACESfrom wger.weight.models import WeightEntryfrom wger.manager.tests.testcase import WorkoutManagerTestCase-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class DeleteUserTestCase(WorkoutManagerTestCase):diff --git a/wger/core/tests/test_preferences.py b/wger/core/tests/test_preferences.pyindex 10ec987ab..92153440d 100644--- a/wger/core/tests/test_preferences.py+++ b/wger/core/tests/test_preferences.py@@ -25,7 +25,7 @@ from wger.utils.constants import TWOPLACESfrom wger.weight.models import WeightEntryfrom wger.manager.tests.testcase import WorkoutManagerTestCase-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class PreferencesTestCase(WorkoutManagerTestCase):diff --git a/wger/core/tests/test_registration.py b/wger/core/tests/test_registration.pyindex 7d0e0111e..9812d0973 100644--- a/wger/core/tests/test_registration.py+++ b/wger/core/tests/test_registration.py@@ -21,7 +21,7 @@ from wger.core.forms import RegistrationFormNoCaptchafrom wger.manager.tests.testcase import WorkoutManagerTestCase-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class RegistrationTestCase(WorkoutManagerTestCase):diff --git a/wger/core/views/license.py b/wger/core/views/license.pyindex 2ac0d8ad2..e4e104824 100644--- a/wger/core/views/license.py+++ b/wger/core/views/license.py@@ -32,7 +32,7 @@ from wger.utils.generic_views import WgerPermissionMixinfrom wger.core.models import License-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class LicenseListView(WgerPermissionMixin, ListView):diff --git a/wger/core/views/misc.py b/wger/core/views/misc.pyindex ed128647d..de7dae505 100644--- a/wger/core/views/misc.py+++ b/wger/core/views/misc.py@@ -41,7 +41,7 @@ from wger.nutrition.models import NutritionPlanfrom wger.weight.models import WeightEntry-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)# ************************diff --git a/wger/core/views/user.py b/wger/core/views/user.pyindex a8190ef41..b1cd42a13 100644--- a/wger/core/views/user.py+++ b/wger/core/views/user.py@@ -51,7 +51,8 @@ from wger.nutrition.models import NutritionPlanfrom wger.config.models import GymConfigfrom wger.weight.models import WeightEntryfrom django.conf import settings-logger = logging.getLogger('wger.custom')++logger = logging.getLogger(__name__)def login(request):diff --git a/wger/exercises/models.py b/wger/exercises/models.pyindex 0533e0f72..9ae30d41b 100644--- a/wger/exercises/models.py+++ b/wger/exercises/models.py@@ -43,7 +43,7 @@ from wger.utils.cache import reset_workout_canonical_formfrom wger.utils.cache import cache_mapper-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)@python_2_unicode_compatiblediff --git a/wger/exercises/views/categories.py b/wger/exercises/views/categories.pyindex e7a28ad67..e2794f666 100644--- a/wger/exercises/views/categories.py+++ b/wger/exercises/views/categories.py@@ -32,7 +32,7 @@ from wger.utils.generic_views import WgerPermissionMixinfrom wger.utils.language import load_language-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)# ************************diff --git a/wger/exercises/views/comments.py b/wger/exercises/views/comments.pyindex d1a208cd9..47e4c8a8f 100644--- a/wger/exercises/views/comments.py+++ b/wger/exercises/views/comments.py@@ -32,7 +32,7 @@ from wger.utils.generic_views import WgerFormMixinfrom wger.utils.generic_views import WgerPermissionMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)# ************************diff --git a/wger/exercises/views/equipment.py b/wger/exercises/views/equipment.pyindex 74168df0c..569a6ffa9 100644--- a/wger/exercises/views/equipment.py+++ b/wger/exercises/views/equipment.py@@ -35,7 +35,7 @@ from wger.utils.constants import PAGINATION_OBJECTS_PER_PAGEfrom wger.utils.language import load_item_languages-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)'''Exercise equipmentdiff --git a/wger/exercises/views/exercises.py b/wger/exercises/views/exercises.pyindex 8ba22edc8..f4c3a9a52 100644--- a/wger/exercises/views/exercises.py+++ b/wger/exercises/views/exercises.py@@ -52,7 +52,7 @@ from wger.config.models import LanguageConfigfrom wger.weight.helpers import process_log_entries-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class ExerciseListView(WgerPermissionMixin, ListView):diff --git a/wger/exercises/views/images.py b/wger/exercises/views/images.pyindex d0904adc5..90dc9fe9c 100644--- a/wger/exercises/views/images.py+++ b/wger/exercises/views/images.py@@ -35,7 +35,7 @@ from wger.utils.generic_views import WgerDeleteMixinfrom wger.utils.generic_views import WgerPermissionMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)'''Exercise imagesdiff --git a/wger/exercises/views/muscles.py b/wger/exercises/views/muscles.pyindex 8363338a7..a635c2f8a 100644--- a/wger/exercises/views/muscles.py+++ b/wger/exercises/views/muscles.py@@ -33,7 +33,7 @@ from wger.utils.generic_views import WgerPermissionMixinfrom wger.utils.language import load_item_languagesfrom wger.config.models import LanguageConfig-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class MuscleListView(ListView):diff --git a/wger/gym/views/admin_config.py b/wger/gym/views/admin_config.pyindex a1819b7d6..e4f8a15b2 100644--- a/wger/gym/views/admin_config.py+++ b/wger/gym/views/admin_config.py@@ -24,7 +24,7 @@ from wger.gym.models import GymAdminConfigfrom wger.utils.generic_views import WgerFormMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class ConfigUpdateView(WgerFormMixin, UpdateView):diff --git a/wger/gym/views/admin_notes.py b/wger/gym/views/admin_notes.pyindex 938468c8c..3c245e6dd 100644--- a/wger/gym/views/admin_notes.py+++ b/wger/gym/views/admin_notes.py@@ -31,7 +31,7 @@ from wger.utils.generic_views import WgerDeleteMixinfrom wger.utils.generic_views import WgerPermissionMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class ListView(WgerPermissionMixin, ListView):diff --git a/wger/gym/views/config.py b/wger/gym/views/config.pyindex cda991f52..0dfa6d41c 100644--- a/wger/gym/views/config.py+++ b/wger/gym/views/config.py@@ -24,7 +24,7 @@ from wger.gym.models import GymConfigfrom wger.utils.generic_views import WgerFormMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class GymConfigUpdateView(WgerFormMixin, UpdateView):diff --git a/wger/gym/views/document.py b/wger/gym/views/document.pyindex 1f1f8c549..8674be5e6 100644--- a/wger/gym/views/document.py+++ b/wger/gym/views/document.py@@ -31,7 +31,7 @@ from wger.utils.generic_views import WgerPermissionMixinfrom wger.gym.models import UserDocument-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class ListView(WgerPermissionMixin, ListView):diff --git a/wger/gym/views/gym.py b/wger/gym/views/gym.pyindex 1800c608a..5f55424d5 100644--- a/wger/gym/views/gym.py+++ b/wger/gym/views/gym.py@@ -44,7 +44,7 @@ from wger.utils.generic_views import WgerPermissionMixinfrom wger.utils.helpers import password_generator-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class GymListView(WgerPermissionMixin, ListView):diff --git a/wger/gym/views/user_config.py b/wger/gym/views/user_config.pyindex 7f8c67a3b..52621a130 100644--- a/wger/gym/views/user_config.py+++ b/wger/gym/views/user_config.py@@ -24,7 +24,7 @@ from wger.gym.models import GymUserConfigfrom wger.utils.generic_views import WgerFormMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class ConfigUpdateView(WgerFormMixin, UpdateView):diff --git a/wger/manager/models.py b/wger/manager/models.pyindex 8405a6260..c842746f7 100644--- a/wger/manager/models.py+++ b/wger/manager/models.py@@ -37,7 +37,7 @@ from wger.utils.cache import cache_mapper, reset_workout_canonical_form, reset_wfrom wger.utils.fields import Html5DateField-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)#diff --git a/wger/manager/pdf.py b/wger/manager/pdf.pyindex 2fdd0def6..a0d4ccaec 100644--- a/wger/manager/pdf.py+++ b/wger/manager/pdf.py@@ -39,7 +39,7 @@ from reportlab.lib import colorsfrom wger import get_version-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)def workout_log(request, id, uidb64=None, token=None):diff --git a/wger/manager/tests/test_copy_workout.py b/wger/manager/tests/test_copy_workout.pyindex 4ecf31d97..4387751e0 100644--- a/wger/manager/tests/test_copy_workout.py+++ b/wger/manager/tests/test_copy_workout.py@@ -19,7 +19,7 @@ from django.core.urlresolvers import reversefrom wger.manager.models import Workoutfrom wger.manager.tests.testcase import WorkoutManagerTestCase-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class CopyWorkoutTestCase(WorkoutManagerTestCase):diff --git a/wger/manager/tests/test_schedule.py b/wger/manager/tests/test_schedule.pyindex 5985845a8..c05193745 100644--- a/wger/manager/tests/test_schedule.py+++ b/wger/manager/tests/test_schedule.py@@ -31,7 +31,7 @@ from wger.manager.tests.testcase import WorkoutManagerAddTestCasefrom wger.utils.helpers import make_token-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class ScheduleRepresentationTestCase(WorkoutManagerTestCase):diff --git a/wger/manager/tests/test_set.py b/wger/manager/tests/test_set.pyindex d0efd4601..d93f07790 100644--- a/wger/manager/tests/test_set.py+++ b/wger/manager/tests/test_set.py@@ -29,7 +29,7 @@ from wger.manager.tests.testcase import WorkoutManagerAddTestCasefrom wger.utils.cache import cache_mapper-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class SetAddTestCase(WorkoutManagerAddTestCase):diff --git a/wger/manager/tests/test_timer.py b/wger/manager/tests/test_timer.pyindex 24313b7ac..1a69c0a2d 100644--- a/wger/manager/tests/test_timer.py+++ b/wger/manager/tests/test_timer.py@@ -24,7 +24,7 @@ from wger.exercises.models import Exercisefrom wger.manager.models import WorkoutSessionfrom wger.manager.models import Workout-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class WorkoutTimerTestCase(WorkoutManagerTestCase):diff --git a/wger/manager/tests/test_weight_log.py b/wger/manager/tests/test_weight_log.pyindex d9a9a6866..a279d033b 100644--- a/wger/manager/tests/test_weight_log.py+++ b/wger/manager/tests/test_weight_log.py@@ -30,7 +30,7 @@ from wger.manager.tests.testcase import WorkoutManagerDeleteTestCasefrom wger.utils.cache import get_template_cache_name, cache_mapper-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class WorkoutLogShareButtonTestCase(WorkoutManagerTestCase):diff --git a/wger/manager/views/day.py b/wger/manager/views/day.pyindex 0558fc4f1..35aed822c 100644--- a/wger/manager/views/day.py+++ b/wger/manager/views/day.py@@ -34,7 +34,7 @@ from wger.manager.forms import DayFormfrom wger.utils.generic_views import WgerFormMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)# ************************diff --git a/wger/manager/views/ical.py b/wger/manager/views/ical.pyindex fb3169b7e..4a6b8a674 100644--- a/wger/manager/views/ical.py+++ b/wger/manager/views/ical.py@@ -35,7 +35,7 @@ from wger.utils.helpers import next_weekdayfrom wger.utils.helpers import check_token-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)'''diff --git a/wger/manager/views/log.py b/wger/manager/views/log.pyindex 62e0fb05f..95ff4e173 100644--- a/wger/manager/views/log.py+++ b/wger/manager/views/log.py@@ -51,8 +51,7 @@ from wger.utils.generic_views import WgerPermissionMixinfrom wger.utils.helpers import check_access, make_tokenfrom wger.weight.helpers import process_log_entries--logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)# ************************@@ -386,6 +385,7 @@ def calendar(request, username=None, year=None, month=None):'''is_owner, user = check_access(request.user, username)+ logger.info('aa bb cc')uid, token = make_token(user)year = int(year) if year else datetime.date.today().yearmonth = int(month) if month else datetime.date.today().monthdiff --git a/wger/manager/views/schedule.py b/wger/manager/views/schedule.pyindex bc78b3c24..5d893e403 100644--- a/wger/manager/views/schedule.py+++ b/wger/manager/views/schedule.py@@ -48,7 +48,7 @@ from wger.utils.pdf import styleSheetfrom wger.utils.pdf import render_footer-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)@login_requireddiff --git a/wger/manager/views/schedule_step.py b/wger/manager/views/schedule_step.pyindex a5fecea3e..cebeedf92 100644--- a/wger/manager/views/schedule_step.py+++ b/wger/manager/views/schedule_step.py@@ -36,7 +36,7 @@ from wger.utils.generic_views import WgerDeleteMixinfrom wger.utils.generic_views import WgerPermissionMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class StepCreateView(WgerFormMixin, CreateView, WgerPermissionMixin):diff --git a/wger/manager/views/set.py b/wger/manager/views/set.pyindex d0c51eccf..885df28c5 100644--- a/wger/manager/views/set.py+++ b/wger/manager/views/set.py@@ -37,7 +37,7 @@ from wger.manager.forms import SettingFormfrom wger.utils.language import load_item_languagesfrom wger.config.models import LanguageConfig-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)# ************************diff --git a/wger/manager/views/workout.py b/wger/manager/views/workout.pyindex a1c1aa5db..1f86ded58 100644--- a/wger/manager/views/workout.py+++ b/wger/manager/views/workout.py@@ -44,7 +44,7 @@ from wger.utils.generic_views import WgerPermissionMixinfrom wger.utils.helpers import make_token-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)# ************************diff --git a/wger/manager/views/workout_session.py b/wger/manager/views/workout_session.pyindex 1d39746f7..1283e7041 100644--- a/wger/manager/views/workout_session.py+++ b/wger/manager/views/workout_session.py@@ -32,7 +32,7 @@ from wger.utils.generic_views import WgerFormMixinfrom wger.utils.generic_views import WgerPermissionMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)'''Workout sessiondiff --git a/wger/nutrition/forms.py b/wger/nutrition/forms.pyindex c7f6b40d6..f7b045661 100644--- a/wger/nutrition/forms.py+++ b/wger/nutrition/forms.py@@ -24,7 +24,7 @@ from wger.nutrition.models import IngredientWeightUnit, Ingredient, MealItemfrom wger.utils.widgets import Html5NumberInput-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class UnitChooserForm(forms.Form):diff --git a/wger/nutrition/models.py b/wger/nutrition/models.pyindex cbcbe2c85..336d4b292 100644--- a/wger/nutrition/models.py+++ b/wger/nutrition/models.py@@ -55,7 +55,7 @@ Simple approximation of energy (kcal) provided per gram or ounce'''-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)@python_2_unicode_compatiblediff --git a/wger/nutrition/tests/test_nutritional_calculations.py b/wger/nutrition/tests/test_nutritional_calculations.pyindex 4a85b922f..dfe61d799 100644--- a/wger/nutrition/tests/test_nutritional_calculations.py+++ b/wger/nutrition/tests/test_nutritional_calculations.py@@ -20,7 +20,7 @@ from wger.nutrition import modelsfrom wger.manager.tests.testcase import WorkoutManagerTestCasefrom wger.utils.constants import TWOPLACES-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class NutritionalValuesCalculationsTestCase(WorkoutManagerTestCase):diff --git a/wger/nutrition/views/bmi.py b/wger/nutrition/views/bmi.pyindex ac00a6ba6..50a71fcd7 100644--- a/wger/nutrition/views/bmi.py+++ b/wger/nutrition/views/bmi.py@@ -26,7 +26,7 @@ from wger.nutrition.forms import BmiFormfrom wger.utils import helpers-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)'''BMI viewsdiff --git a/wger/nutrition/views/calculator.py b/wger/nutrition/views/calculator.pyindex ad78e29d8..10a4ce4f5 100644--- a/wger/nutrition/views/calculator.py+++ b/wger/nutrition/views/calculator.py@@ -27,7 +27,7 @@ from wger.nutrition.forms import PhysicalActivitiesFormfrom wger.nutrition.forms import DailyCaloriesForm-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)'''Protein calculator viewsdiff --git a/wger/nutrition/views/ingredient.py b/wger/nutrition/views/ingredient.pyindex 84eeda671..cd52a1d62 100644--- a/wger/nutrition/views/ingredient.py+++ b/wger/nutrition/views/ingredient.py@@ -43,7 +43,7 @@ from wger.utils.language import load_ingredient_languagesfrom wger.utils.cache import cache_mapper-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)# ************************diff --git a/wger/nutrition/views/meal.py b/wger/nutrition/views/meal.pyindex 8dea56d62..80818ef97 100644--- a/wger/nutrition/views/meal.py+++ b/wger/nutrition/views/meal.py@@ -30,7 +30,7 @@ from wger.nutrition.models import Mealfrom wger.utils.generic_views import WgerFormMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)# ************************diff --git a/wger/nutrition/views/meal_item.py b/wger/nutrition/views/meal_item.pyindex cb8124408..60281921e 100644--- a/wger/nutrition/views/meal_item.py+++ b/wger/nutrition/views/meal_item.py@@ -30,7 +30,7 @@ from wger.nutrition.models import MealItemfrom wger.utils.generic_views import WgerFormMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)@login_requireddiff --git a/wger/nutrition/views/plan.py b/wger/nutrition/views/plan.pyindex 786c1534f..e798974c3 100644--- a/wger/nutrition/views/plan.py+++ b/wger/nutrition/views/plan.py@@ -50,7 +50,7 @@ from wger.utils.pdf import styleSheetfrom wger.utils.language import load_language-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)# ************************diff --git a/wger/nutrition/views/unit.py b/wger/nutrition/views/unit.pyindex 51adcd10b..c509240d5 100644--- a/wger/nutrition/views/unit.py+++ b/wger/nutrition/views/unit.py@@ -33,7 +33,7 @@ from wger.utils.generic_views import WgerDeleteMixinfrom wger.utils.constants import PAGINATION_OBJECTS_PER_PAGEfrom wger.utils.language import load_language-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)# ************************# Weight units functions# ************************diff --git a/wger/nutrition/views/unit_ingredient.py b/wger/nutrition/views/unit_ingredient.pyindex f16b3cde6..70bdfe40e 100644--- a/wger/nutrition/views/unit_ingredient.py+++ b/wger/nutrition/views/unit_ingredient.py@@ -35,7 +35,7 @@ from wger.utils.generic_views import WgerDeleteMixinfrom wger.utils.generic_views import WgerPermissionMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)# ************************diff --git a/wger/settings_global.py b/wger/settings_global.pyindex 15b8cec67..e1f67d234 100644--- a/wger/settings_global.py+++ b/wger/settings_global.py@@ -203,33 +203,17 @@ FLAVOURS_STORAGE_BACKEND = 'session'## Logging+# See http://docs.python.org/library/logging.config.html#LOGGING = {'version': 1,'disable_existing_loggers': False,'formatters': {- 'verbose': {- 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'- },'simple': {'format': '%(levelname)s %(asctime)s %(module)s %(message)s'},},- 'filters': {- 'require_debug_false': {- '()': 'django.utils.log.RequireDebugFalse'- }- },'handlers': {- 'null': {- 'level': 'DEBUG',- 'class': 'django.utils.log.NullHandler',- },- 'mail_admins': {- 'level': 'ERROR',- 'filters': ['require_debug_false'],- 'class': 'django.utils.log.AdminEmailHandler'- },'console': {'level': 'DEBUG','class': 'logging.StreamHandler',@@ -237,18 +221,8 @@ LOGGING = {},},'loggers': {- 'django': {- 'handlers': ['console', 'mail_admins'],- 'propagate': True,- 'level': 'INFO',- },- 'django.request': {- 'handlers': ['mail_admins'],- 'level': 'ERROR',- 'propagate': True,- },- 'wger.custom': {- 'handlers': ['console', 'mail_admins'],+ 'wger': {+ 'handlers': ['console'],'level': 'DEBUG',}}diff --git a/wger/utils/cache.py b/wger/utils/cache.pyindex 231dbcdd6..45e171984 100644--- a/wger/utils/cache.py+++ b/wger/utils/cache.py@@ -19,7 +19,7 @@ from django.core.cache import cachefrom django.utils.encoding import force_bytes-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)def get_template_cache_name(fragment_name='', *args):diff --git a/wger/utils/fields.py b/wger/utils/fields.pyindex 8f4a03cf3..bea34ede5 100644--- a/wger/utils/fields.py+++ b/wger/utils/fields.py@@ -19,7 +19,7 @@ from django.db import modelsfrom wger.utils.widgets import Html5FormDateFieldfrom wger.utils.widgets import Html5FormTimeField-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)##diff --git a/wger/utils/generic_views.py b/wger/utils/generic_views.pyindex fda22a14f..53b9aef92 100644--- a/wger/utils/generic_views.py+++ b/wger/utils/generic_views.py@@ -32,7 +32,7 @@ from wger.utils.constants import HTML_ATTRIBUTES_WHITELISTfrom wger.utils.constants import HTML_STYLES_WHITELIST-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class WgerPermissionMixin(object):diff --git a/wger/utils/helpers.py b/wger/utils/helpers.pyindex 45db790d6..0e5d13f16 100644--- a/wger/utils/helpers.py+++ b/wger/utils/helpers.py@@ -31,7 +31,7 @@ from django.shortcuts import get_object_or_404from django.utils.encoding import force_bytesfrom django.utils.http import urlsafe_base64_decode, urlsafe_base64_encode-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class DecimalJsonEncoder(json.JSONEncoder):diff --git a/wger/utils/language.py b/wger/utils/language.pyindex 19d485e7d..f790bc7ad 100644--- a/wger/utils/language.py+++ b/wger/utils/language.py@@ -23,7 +23,7 @@ from wger.config.models import LanguageConfigfrom wger.utils.cache import cache_mapper-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)# ************************diff --git a/wger/utils/middleware.py b/wger/utils/middleware.pyindex 3095322bc..a13e21d1b 100644--- a/wger/utils/middleware.py+++ b/wger/utils/middleware.py@@ -25,7 +25,7 @@ from django.contrib.auth import login as django_loginfrom wger.core.demo import create_temporary_user-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)SPECIAL_PATHS = ('dashboard',)diff --git a/wger/utils/resources.py b/wger/utils/resources.pyindex 8b85173f5..fd0bef570 100644--- a/wger/utils/resources.py+++ b/wger/utils/resources.py@@ -16,7 +16,7 @@ import loggingfrom tastypie.authorization import ReadOnlyAuthorization-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class UserObjectsOnlyAuthorization(ReadOnlyAuthorization):diff --git a/wger/utils/units.py b/wger/utils/units.pyindex f84a446ef..9c62e4d1a 100644--- a/wger/utils/units.py+++ b/wger/utils/units.py@@ -18,7 +18,7 @@ from decimal import Decimalfrom wger.utils.constants import TWOPLACES, FOURPLACES-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)'''diff --git a/wger/utils/user_agents.py b/wger/utils/user_agents.pyindex b444b46cb..5e303eb83 100644--- a/wger/utils/user_agents.py+++ b/wger/utils/user_agents.py@@ -14,7 +14,7 @@import logging-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)def is_amazon_webview(user_agent):diff --git a/wger/utils/widgets.py b/wger/utils/widgets.pyindex 74fa77a03..af9b37984 100644--- a/wger/utils/widgets.py+++ b/wger/utils/widgets.py@@ -31,7 +31,7 @@ from django.utils.html import conditional_escapefrom django.utils.safestring import mark_safe-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)#diff --git a/wger/weight/helpers.py b/wger/weight/helpers.pyindex 9af685dc3..9dc00ab6d 100644--- a/wger/weight/helpers.py+++ b/wger/weight/helpers.py@@ -25,7 +25,7 @@ from collections import OrderedDictfrom wger.utils.helpers import DecimalJsonEncoderfrom wger.weight.models import WeightEntry-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)def parse_weight_csv(request, cleaned_data):diff --git a/wger/weight/tests/test_csv_export.py b/wger/weight/tests/test_csv_export.pyindex d71759a0a..9ba34081a 100644--- a/wger/weight/tests/test_csv_export.py+++ b/wger/weight/tests/test_csv_export.py@@ -18,7 +18,7 @@ from django.core.urlresolvers import reversefrom wger.manager.tests.testcase import WorkoutManagerTestCase-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class WeightCsvExportTestCase(WorkoutManagerTestCase):diff --git a/wger/weight/tests/test_csv_import.py b/wger/weight/tests/test_csv_import.pyindex a1c2f41b4..be335f3b7 100644--- a/wger/weight/tests/test_csv_import.py+++ b/wger/weight/tests/test_csv_import.py@@ -19,7 +19,7 @@ from django.core.urlresolvers import reversefrom wger.weight.models import WeightEntryfrom wger.manager.tests.testcase import WorkoutManagerTestCase-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class WeightCsvImportTestCase(WorkoutManagerTestCase):diff --git a/wger/weight/tests/test_overview.py b/wger/weight/tests/test_overview.pyindex 94f42944e..a3d16b5e7 100644--- a/wger/weight/tests/test_overview.py+++ b/wger/weight/tests/test_overview.py@@ -18,7 +18,7 @@ from django.core.urlresolvers import reversefrom wger.manager.tests.testcase import WorkoutManagerTestCase-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class WeightOverviewTestCase(WorkoutManagerTestCase):diff --git a/wger/weight/views.py b/wger/weight/views.pyindex ceba6675c..b55112f72 100644--- a/wger/weight/views.py+++ b/wger/weight/views.py@@ -42,7 +42,7 @@ from wger.weight import helpersfrom wger.utils.generic_views import WgerFormMixin-logger = logging.getLogger('wger.custom')+logger = logging.getLogger(__name__)class WeightAddView(WgerFormMixin, CreateView):