From c0df1f38b8994610493e1edbd41a47b9db19ba8f Mon Sep 17 00:00:00 2001 From: "Langhammer, Jens" Date: Fri, 4 Oct 2019 10:08:53 +0200 Subject: [PATCH] *(minor): remove __name__ param from get_logger --- .coveragerc | 1 - .prospector.yaml | 2 -- .pylintrc | 3 ++- passbook/admin/templatetags/admin_reflection.py | 2 +- passbook/audit/models.py | 2 +- passbook/core/apps.py | 2 +- passbook/core/auth/factors/dummy.py | 2 +- passbook/core/auth/factors/password.py | 2 +- passbook/core/auth/view.py | 2 +- passbook/core/forms/authentication.py | 2 +- passbook/core/management/commands/import_users.py | 2 +- passbook/core/management/commands/web.py | 2 +- passbook/core/management/commands/worker.py | 2 +- passbook/core/models.py | 2 +- passbook/core/signals.py | 2 +- passbook/core/tasks.py | 2 +- passbook/core/urls.py | 2 +- passbook/core/views/access.py | 2 +- passbook/core/views/authentication.py | 2 +- passbook/hibp_policy/models.py | 2 +- passbook/ldap/auth.py | 2 +- passbook/ldap/ldap_connector.py | 2 +- passbook/lib/sentry.py | 2 +- passbook/lib/templatetags/is_active.py | 2 +- passbook/lib/templatetags/reflection.py | 2 +- passbook/oauth_client/apps.py | 2 +- passbook/oauth_client/clients.py | 2 +- passbook/oauth_client/source_types/azure_ad.py | 2 +- passbook/oauth_client/source_types/discord.py | 2 +- passbook/oauth_client/source_types/manager.py | 2 +- passbook/oauth_client/source_types/reddit.py | 2 +- passbook/oauth_client/source_types/supervisr.py | 2 +- passbook/oauth_client/source_types/twitter.py | 2 +- passbook/oauth_client/views/core.py | 2 +- passbook/oauth_provider/views/oauth2.py | 2 +- passbook/oidc_provider/apps.py | 2 +- passbook/oidc_provider/lib.py | 2 +- passbook/otp/factors.py | 2 +- passbook/otp/views.py | 2 +- passbook/password_expiry_policy/models.py | 2 +- passbook/root/celery.py | 2 +- passbook/root/urls.py | 2 +- passbook/saml_idp/apps.py | 2 +- passbook/saml_idp/base.py | 2 +- passbook/saml_idp/models.py | 2 +- passbook/saml_idp/views.py | 2 +- passbook/saml_idp/xml_render.py | 2 +- passbook/saml_idp/xml_signing.py | 2 +- passbook/suspicious_policy/signals.py | 2 +- 49 files changed, 48 insertions(+), 50 deletions(-) diff --git a/.coveragerc b/.coveragerc index 0263aa71e..552696206 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,7 +1,6 @@ [run] source = passbook omit = - env/ */wsgi.py manage.py */migrations/* diff --git a/.prospector.yaml b/.prospector.yaml index 35617deea..c687cd8be 100644 --- a/.prospector.yaml +++ b/.prospector.yaml @@ -3,11 +3,9 @@ test-warnings: true doc-warnings: false ignore-paths: - - env - migrations - docs - node_modules - - client-packages uses: - django diff --git a/.pylintrc b/.pylintrc index d3b2c19be..8484c1697 100644 --- a/.pylintrc +++ b/.pylintrc @@ -2,9 +2,10 @@ disable=redefined-outer-name,arguments-differ,no-self-use,cyclic-import,fixme,locally-disabled,unpacking-non-sequence,too-many-ancestors,too-many-branches,too-few-public-methods load-plugins=pylint_django,pylint.extensions.bad_builtin -#,pylint.extensions.docparams extension-pkg-whitelist=lxml const-rgx=[a-zA-Z0-9_]{1,40}$ +ignored-modules=django-otp +jobs=4 [SIMILARITIES] diff --git a/passbook/admin/templatetags/admin_reflection.py b/passbook/admin/templatetags/admin_reflection.py index d4e3359f3..fa01a0099 100644 --- a/passbook/admin/templatetags/admin_reflection.py +++ b/passbook/admin/templatetags/admin_reflection.py @@ -8,7 +8,7 @@ from structlog import get_logger from passbook.lib.utils.template import render_to_string register = template.Library() -LOGGER = get_logger(__name__) +LOGGER = get_logger() @register.simple_tag() def get_links(model_instance): diff --git a/passbook/audit/models.py b/passbook/audit/models.py index a12a3c5e6..6febb1698 100644 --- a/passbook/audit/models.py +++ b/passbook/audit/models.py @@ -10,7 +10,7 @@ from structlog import get_logger from passbook.lib.models import UUIDModel -LOGGER = get_logger(__name__) +LOGGER = get_logger() class AuditEntry(UUIDModel): """An individual audit log entry""" diff --git a/passbook/core/apps.py b/passbook/core/apps.py index ac2e58b34..8ea44e28f 100644 --- a/passbook/core/apps.py +++ b/passbook/core/apps.py @@ -6,7 +6,7 @@ from structlog import get_logger from passbook.lib.config import CONFIG -LOGGER = get_logger(__name__) +LOGGER = get_logger() class PassbookCoreConfig(AppConfig): """passbook core app config""" diff --git a/passbook/core/auth/factors/dummy.py b/passbook/core/auth/factors/dummy.py index fda43b9b7..ebfd29ed6 100644 --- a/passbook/core/auth/factors/dummy.py +++ b/passbook/core/auth/factors/dummy.py @@ -3,7 +3,7 @@ from structlog import get_logger from passbook.core.auth.factor import AuthenticationFactor -LOGGER = get_logger(__name__) +LOGGER = get_logger() class DummyFactor(AuthenticationFactor): diff --git a/passbook/core/auth/factors/password.py b/passbook/core/auth/factors/password.py index 416fe9398..8aba26e5b 100644 --- a/passbook/core/auth/factors/password.py +++ b/passbook/core/auth/factors/password.py @@ -19,7 +19,7 @@ from passbook.core.tasks import send_email from passbook.lib.config import CONFIG from passbook.lib.utils.reflection import path_to_class -LOGGER = get_logger(__name__) +LOGGER = get_logger() def authenticate(request, backends, **credentials): diff --git a/passbook/core/auth/view.py b/passbook/core/auth/view.py index 242f667ab..96eaf8736 100644 --- a/passbook/core/auth/view.py +++ b/passbook/core/auth/view.py @@ -14,7 +14,7 @@ from passbook.lib.utils.reflection import class_to_path, path_to_class from passbook.lib.utils.urls import is_url_absolute from passbook.policy.engine import PolicyEngine -LOGGER = get_logger(__name__) +LOGGER = get_logger() def _redirect_with_qs(view, get_query_set=None): """Wrapper to redirect whilst keeping GET Parameters""" diff --git a/passbook/core/forms/authentication.py b/passbook/core/forms/authentication.py index 875285702..12c3380bb 100644 --- a/passbook/core/forms/authentication.py +++ b/passbook/core/forms/authentication.py @@ -9,7 +9,7 @@ from passbook.core.models import User from passbook.lib.config import CONFIG from passbook.lib.utils.ui import human_list -LOGGER = get_logger(__name__) +LOGGER = get_logger() class LoginForm(forms.Form): """Allow users to login""" diff --git a/passbook/core/management/commands/import_users.py b/passbook/core/management/commands/import_users.py index dedc1b1ac..889c5e5d7 100644 --- a/passbook/core/management/commands/import_users.py +++ b/passbook/core/management/commands/import_users.py @@ -7,7 +7,7 @@ from structlog import get_logger from passbook.core.models import User -LOGGER = get_logger(__name__) +LOGGER = get_logger() class Command(BaseCommand): """Import users from CSV file""" diff --git a/passbook/core/management/commands/web.py b/passbook/core/management/commands/web.py index a85870949..34e4f69e0 100644 --- a/passbook/core/management/commands/web.py +++ b/passbook/core/management/commands/web.py @@ -8,7 +8,7 @@ from structlog import get_logger from passbook.lib.config import CONFIG from passbook.root.wsgi import application -LOGGER = get_logger(__name__) +LOGGER = get_logger() class Command(BaseCommand): diff --git a/passbook/core/management/commands/worker.py b/passbook/core/management/commands/worker.py index 3e2ca36df..cb11f59ea 100644 --- a/passbook/core/management/commands/worker.py +++ b/passbook/core/management/commands/worker.py @@ -6,7 +6,7 @@ from structlog import get_logger from passbook.root.celery import CELERY_APP -LOGGER = get_logger(__name__) +LOGGER = get_logger() class Command(BaseCommand): diff --git a/passbook/core/models.py b/passbook/core/models.py index 6807a35b7..d240913bf 100644 --- a/passbook/core/models.py +++ b/passbook/core/models.py @@ -19,7 +19,7 @@ from passbook.lib.models import CreatedUpdatedModel, UUIDModel from passbook.policy.exceptions import PolicyException from passbook.policy.struct import PolicyRequest, PolicyResult -LOGGER = get_logger(__name__) +LOGGER = get_logger() def default_nonce_duration(): diff --git a/passbook/core/signals.py b/passbook/core/signals.py index 60fdac8fd..4e798f1ae 100644 --- a/passbook/core/signals.py +++ b/passbook/core/signals.py @@ -7,7 +7,7 @@ from structlog import get_logger from passbook.core.exceptions import PasswordPolicyInvalid -LOGGER = get_logger(__name__) +LOGGER = get_logger() user_signed_up = Signal(providing_args=['request', 'user']) invitation_created = Signal(providing_args=['request', 'invitation']) diff --git a/passbook/core/tasks.py b/passbook/core/tasks.py index fc1c5ac1b..bc9960ec2 100644 --- a/passbook/core/tasks.py +++ b/passbook/core/tasks.py @@ -10,7 +10,7 @@ from passbook.core.models import Nonce from passbook.lib.config import CONFIG from passbook.root.celery import CELERY_APP -LOGGER = get_logger(__name__) +LOGGER = get_logger() @CELERY_APP.task() def send_email(to_address, subject, template, context): diff --git a/passbook/core/urls.py b/passbook/core/urls.py index 3ed35de5d..560f292be 100644 --- a/passbook/core/urls.py +++ b/passbook/core/urls.py @@ -5,7 +5,7 @@ from structlog import get_logger from passbook.core.auth import view from passbook.core.views import authentication, overview, user -LOGGER = get_logger(__name__) +LOGGER = get_logger() urlpatterns = [ # Authentication views diff --git a/passbook/core/views/access.py b/passbook/core/views/access.py index 8bd17c9a4..1086f73be 100644 --- a/passbook/core/views/access.py +++ b/passbook/core/views/access.py @@ -6,7 +6,7 @@ from structlog import get_logger from passbook.core.models import Application from passbook.policy.engine import PolicyEngine -LOGGER = get_logger(__name__) +LOGGER = get_logger() class AccessMixin: """Mixin class for usage in Authorization views. diff --git a/passbook/core/views/authentication.py b/passbook/core/views/authentication.py index 732f6c2a5..73ad943e7 100644 --- a/passbook/core/views/authentication.py +++ b/passbook/core/views/authentication.py @@ -20,7 +20,7 @@ from passbook.core.signals import invitation_used, user_signed_up from passbook.core.tasks import send_email from passbook.lib.config import CONFIG -LOGGER = get_logger(__name__) +LOGGER = get_logger() class LoginView(UserPassesTestMixin, FormView): diff --git a/passbook/hibp_policy/models.py b/passbook/hibp_policy/models.py index 1c66ecba8..eb8c3bb06 100644 --- a/passbook/hibp_policy/models.py +++ b/passbook/hibp_policy/models.py @@ -8,7 +8,7 @@ from structlog import get_logger from passbook.core.models import Policy, PolicyResult, User -LOGGER = get_logger(__name__) +LOGGER = get_logger() class HaveIBeenPwendPolicy(Policy): """Check if password is on HaveIBeenPwned's list by upload the first diff --git a/passbook/ldap/auth.py b/passbook/ldap/auth.py index 33068d19e..6c7b59d5a 100644 --- a/passbook/ldap/auth.py +++ b/passbook/ldap/auth.py @@ -5,7 +5,7 @@ from structlog import get_logger from passbook.ldap.ldap_connector import LDAPConnector from passbook.ldap.models import LDAPSource -LOGGER = get_logger(__name__) +LOGGER = get_logger() class LDAPBackend(ModelBackend): diff --git a/passbook/ldap/ldap_connector.py b/passbook/ldap/ldap_connector.py index 0bd3f780a..fbfbb71e2 100644 --- a/passbook/ldap/ldap_connector.py +++ b/passbook/ldap/ldap_connector.py @@ -9,7 +9,7 @@ from passbook.core.models import User from passbook.ldap.models import LDAPSource from passbook.lib.config import CONFIG -LOGGER = get_logger(__name__) +LOGGER = get_logger() USERNAME_FIELD = CONFIG.y('ldap.username_field', 'sAMAccountName') LOGIN_FIELD = CONFIG.y('ldap.login_field', 'userPrincipalName') diff --git a/passbook/lib/sentry.py b/passbook/lib/sentry.py index ef8ee78ff..041ee4058 100644 --- a/passbook/lib/sentry.py +++ b/passbook/lib/sentry.py @@ -1,7 +1,7 @@ """passbook sentry integration""" from structlog import get_logger -LOGGER = get_logger(__name__) +LOGGER = get_logger() def before_send(event, hint): diff --git a/passbook/lib/templatetags/is_active.py b/passbook/lib/templatetags/is_active.py index a94d7d354..dc93c1dde 100644 --- a/passbook/lib/templatetags/is_active.py +++ b/passbook/lib/templatetags/is_active.py @@ -5,7 +5,7 @@ from structlog import get_logger register = template.Library() -LOGGER = get_logger(__name__) +LOGGER = get_logger() @register.simple_tag(takes_context=True) diff --git a/passbook/lib/templatetags/reflection.py b/passbook/lib/templatetags/reflection.py index 26350595b..c66355b6a 100644 --- a/passbook/lib/templatetags/reflection.py +++ b/passbook/lib/templatetags/reflection.py @@ -3,7 +3,7 @@ from django import template from structlog import get_logger register = template.Library() -LOGGER = get_logger(__name__) +LOGGER = get_logger() def get_key_unique(context): diff --git a/passbook/oauth_client/apps.py b/passbook/oauth_client/apps.py index eb0997062..da8af24e8 100644 --- a/passbook/oauth_client/apps.py +++ b/passbook/oauth_client/apps.py @@ -6,7 +6,7 @@ from structlog import get_logger from passbook.lib.config import CONFIG -LOGGER = get_logger(__name__) +LOGGER = get_logger() class PassbookOAuthClientConfig(AppConfig): """passbook oauth_client config""" diff --git a/passbook/oauth_client/clients.py b/passbook/oauth_client/clients.py index 70c70444c..cbbdb57ae 100644 --- a/passbook/oauth_client/clients.py +++ b/passbook/oauth_client/clients.py @@ -11,7 +11,7 @@ from requests.exceptions import RequestException from requests_oauthlib import OAuth1 from structlog import get_logger -LOGGER = get_logger(__name__) +LOGGER = get_logger() class BaseOAuthClient: diff --git a/passbook/oauth_client/source_types/azure_ad.py b/passbook/oauth_client/source_types/azure_ad.py index 064cefdae..b35c6b163 100644 --- a/passbook/oauth_client/source_types/azure_ad.py +++ b/passbook/oauth_client/source_types/azure_ad.py @@ -10,7 +10,7 @@ from passbook.oauth_client.source_types.manager import MANAGER, RequestKind from passbook.oauth_client.utils import user_get_or_create from passbook.oauth_client.views.core import OAuthCallback -LOGGER = get_logger(__name__) +LOGGER = get_logger() class AzureADOAuth2Client(OAuth2Client): diff --git a/passbook/oauth_client/source_types/discord.py b/passbook/oauth_client/source_types/discord.py index 1cd3d90a8..c8c9e714e 100644 --- a/passbook/oauth_client/source_types/discord.py +++ b/passbook/oauth_client/source_types/discord.py @@ -9,7 +9,7 @@ from passbook.oauth_client.source_types.manager import MANAGER, RequestKind from passbook.oauth_client.utils import user_get_or_create from passbook.oauth_client.views.core import OAuthCallback, OAuthRedirect -LOGGER = get_logger(__name__) +LOGGER = get_logger() @MANAGER.source(kind=RequestKind.redirect, name='Discord') diff --git a/passbook/oauth_client/source_types/manager.py b/passbook/oauth_client/source_types/manager.py index 69b8fbe7e..d3b1d53c2 100644 --- a/passbook/oauth_client/source_types/manager.py +++ b/passbook/oauth_client/source_types/manager.py @@ -5,7 +5,7 @@ from structlog import get_logger from passbook.oauth_client.views.core import OAuthCallback, OAuthRedirect -LOGGER = get_logger(__name__) +LOGGER = get_logger() class RequestKind(Enum): """Enum of OAuth Request types""" diff --git a/passbook/oauth_client/source_types/reddit.py b/passbook/oauth_client/source_types/reddit.py index 270a096b5..b2dd3a71b 100644 --- a/passbook/oauth_client/source_types/reddit.py +++ b/passbook/oauth_client/source_types/reddit.py @@ -10,7 +10,7 @@ from passbook.oauth_client.source_types.manager import MANAGER, RequestKind from passbook.oauth_client.utils import user_get_or_create from passbook.oauth_client.views.core import OAuthCallback, OAuthRedirect -LOGGER = get_logger(__name__) +LOGGER = get_logger() @MANAGER.source(kind=RequestKind.redirect, name='reddit') diff --git a/passbook/oauth_client/source_types/supervisr.py b/passbook/oauth_client/source_types/supervisr.py index 5566bc799..4a30cba7f 100644 --- a/passbook/oauth_client/source_types/supervisr.py +++ b/passbook/oauth_client/source_types/supervisr.py @@ -10,7 +10,7 @@ from passbook.oauth_client.source_types.manager import MANAGER, RequestKind from passbook.oauth_client.utils import user_get_or_create from passbook.oauth_client.views.core import OAuthCallback -LOGGER = get_logger(__name__) +LOGGER = get_logger() class SupervisrOAuth2Client(OAuth2Client): diff --git a/passbook/oauth_client/source_types/twitter.py b/passbook/oauth_client/source_types/twitter.py index 8008b4b26..fb49f9d4d 100644 --- a/passbook/oauth_client/source_types/twitter.py +++ b/passbook/oauth_client/source_types/twitter.py @@ -8,7 +8,7 @@ from passbook.oauth_client.source_types.manager import MANAGER, RequestKind from passbook.oauth_client.utils import user_get_or_create from passbook.oauth_client.views.core import OAuthCallback -LOGGER = get_logger(__name__) +LOGGER = get_logger() class TwitterOAuthClient(OAuthClient): diff --git a/passbook/oauth_client/views/core.py b/passbook/oauth_client/views/core.py index 7345b02c3..b137fec8f 100644 --- a/passbook/oauth_client/views/core.py +++ b/passbook/oauth_client/views/core.py @@ -16,7 +16,7 @@ from passbook.lib.utils.reflection import app from passbook.oauth_client.clients import get_client from passbook.oauth_client.models import OAuthSource, UserOAuthSourceConnection -LOGGER = get_logger(__name__) +LOGGER = get_logger() # pylint: disable=too-few-public-methods diff --git a/passbook/oauth_provider/views/oauth2.py b/passbook/oauth_provider/views/oauth2.py index 4fadccaf3..e42886a0f 100644 --- a/passbook/oauth_provider/views/oauth2.py +++ b/passbook/oauth_provider/views/oauth2.py @@ -14,7 +14,7 @@ from passbook.core.views.access import AccessMixin from passbook.core.views.utils import LoadingView, PermissionDeniedView from passbook.oauth_provider.models import OAuth2Provider -LOGGER = get_logger(__name__) +LOGGER = get_logger() class PassbookAuthorizationLoadingView(LoginRequiredMixin, LoadingView): diff --git a/passbook/oidc_provider/apps.py b/passbook/oidc_provider/apps.py index 168b5f51a..34130de33 100644 --- a/passbook/oidc_provider/apps.py +++ b/passbook/oidc_provider/apps.py @@ -4,7 +4,7 @@ from django.db.utils import InternalError, OperationalError, ProgrammingError from django.urls import include, path from structlog import get_logger -LOGGER = get_logger(__name__) +LOGGER = get_logger() class PassbookOIDCProviderConfig(AppConfig): """passbook auth oidc provider app config""" diff --git a/passbook/oidc_provider/lib.py b/passbook/oidc_provider/lib.py index 06cde26c0..19b33eef5 100644 --- a/passbook/oidc_provider/lib.py +++ b/passbook/oidc_provider/lib.py @@ -6,7 +6,7 @@ from structlog import get_logger from passbook.core.models import Application from passbook.policy.engine import PolicyEngine -LOGGER = get_logger(__name__) +LOGGER = get_logger() def check_permissions(request, user, client): """Check permissions, used for diff --git a/passbook/otp/factors.py b/passbook/otp/factors.py index a4a77daf5..bab0cb796 100644 --- a/passbook/otp/factors.py +++ b/passbook/otp/factors.py @@ -9,7 +9,7 @@ from passbook.core.auth.factor import AuthenticationFactor from passbook.otp.forms import OTPVerifyForm from passbook.otp.views import OTP_SETTING_UP_KEY, EnableView -LOGGER = get_logger(__name__) +LOGGER = get_logger() class OTPFactor(FormView, AuthenticationFactor): """OTP Factor View""" diff --git a/passbook/otp/views.py b/passbook/otp/views.py index ff4ee64f1..3c01bd851 100644 --- a/passbook/otp/views.py +++ b/passbook/otp/views.py @@ -23,7 +23,7 @@ from passbook.otp.utils import otpauth_url OTP_SESSION_KEY = 'passbook_otp_key' OTP_SETTING_UP_KEY = 'passbook_otp_setup' -LOGGER = get_logger(__name__) +LOGGER = get_logger() class UserSettingsView(LoginRequiredMixin, TemplateView): """View for user settings to control OTP""" diff --git a/passbook/password_expiry_policy/models.py b/passbook/password_expiry_policy/models.py index 1bedde70e..ed5d7fa9d 100644 --- a/passbook/password_expiry_policy/models.py +++ b/passbook/password_expiry_policy/models.py @@ -9,7 +9,7 @@ from structlog import get_logger from passbook.core.models import Policy from passbook.policy.struct import PolicyRequest, PolicyResult -LOGGER = get_logger(__name__) +LOGGER = get_logger() class PasswordExpiryPolicy(Policy): diff --git a/passbook/root/celery.py b/passbook/root/celery.py index a5d6e19e4..d87531ea0 100644 --- a/passbook/root/celery.py +++ b/passbook/root/celery.py @@ -9,7 +9,7 @@ from structlog import get_logger # set the default Django settings module for the 'celery' program. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "passbook.root.settings") -LOGGER = get_logger(__name__) +LOGGER = get_logger() CELERY_APP = Celery('passbook') diff --git a/passbook/root/urls.py b/passbook/root/urls.py index 1a16e4585..876d2f0b2 100644 --- a/passbook/root/urls.py +++ b/passbook/root/urls.py @@ -8,7 +8,7 @@ from structlog import get_logger from passbook.core.views import error from passbook.lib.utils.reflection import get_apps -LOGGER = get_logger(__name__) +LOGGER = get_logger() admin.autodiscover() admin.site.login = RedirectView.as_view(pattern_name='passbook_core:auth-login') diff --git a/passbook/saml_idp/apps.py b/passbook/saml_idp/apps.py index 53a181e83..fd080ac32 100644 --- a/passbook/saml_idp/apps.py +++ b/passbook/saml_idp/apps.py @@ -6,7 +6,7 @@ from structlog import get_logger from passbook.lib.config import CONFIG -LOGGER = get_logger(__name__) +LOGGER = get_logger() class PassbookSAMLIDPConfig(AppConfig): """passbook saml_idp app config""" diff --git a/passbook/saml_idp/base.py b/passbook/saml_idp/base.py index cc215e2c0..1fd182928 100644 --- a/passbook/saml_idp/base.py +++ b/passbook/saml_idp/base.py @@ -65,7 +65,7 @@ class Processor: def __init__(self, remote): self.name = remote.name self._remote = remote - self._logger = get_logger(__name__) + self._logger = get_logger() self._system_params['ISSUER'] = self._remote.issuer self._logger.debug('processor configured') diff --git a/passbook/saml_idp/models.py b/passbook/saml_idp/models.py index 4cf58bd99..51c730c50 100644 --- a/passbook/saml_idp/models.py +++ b/passbook/saml_idp/models.py @@ -9,7 +9,7 @@ from passbook.core.models import PropertyMapping, Provider from passbook.lib.utils.reflection import class_to_path, path_to_class from passbook.saml_idp.base import Processor -LOGGER = get_logger(__name__) +LOGGER = get_logger() class SAMLProvider(Provider): diff --git a/passbook/saml_idp/views.py b/passbook/saml_idp/views.py index 29243201a..5cafc866b 100644 --- a/passbook/saml_idp/views.py +++ b/passbook/saml_idp/views.py @@ -21,7 +21,7 @@ from passbook.policy.engine import PolicyEngine from passbook.saml_idp import exceptions from passbook.saml_idp.models import SAMLProvider -LOGGER = get_logger(__name__) +LOGGER = get_logger() URL_VALIDATOR = URLValidator(schemes=('http', 'https')) diff --git a/passbook/saml_idp/xml_render.py b/passbook/saml_idp/xml_render.py index 108497514..edce64110 100644 --- a/passbook/saml_idp/xml_render.py +++ b/passbook/saml_idp/xml_render.py @@ -5,7 +5,7 @@ from structlog import get_logger from passbook.lib.utils.template import render_to_string from passbook.saml_idp.xml_signing import get_signature_xml, sign_with_signxml -LOGGER = get_logger(__name__) +LOGGER = get_logger() def _get_attribute_statement(params): diff --git a/passbook/saml_idp/xml_signing.py b/passbook/saml_idp/xml_signing.py index 4600bdd62..97bf2013e 100644 --- a/passbook/saml_idp/xml_signing.py +++ b/passbook/saml_idp/xml_signing.py @@ -7,7 +7,7 @@ from structlog import get_logger from passbook.lib.utils.template import render_to_string -LOGGER = get_logger(__name__) +LOGGER = get_logger() def sign_with_signxml(private_key, data, cert, reference_uri=None): diff --git a/passbook/suspicious_policy/signals.py b/passbook/suspicious_policy/signals.py index 1a1df8dc3..9c7d5db0b 100644 --- a/passbook/suspicious_policy/signals.py +++ b/passbook/suspicious_policy/signals.py @@ -7,7 +7,7 @@ from structlog import get_logger from passbook.core.models import User from passbook.suspicious_policy.models import IPScore, UserScore -LOGGER = get_logger(__name__) +LOGGER = get_logger() def get_remote_ip(request):