Skip to content

Commit

Permalink
Update logging.getLogger() to use __name__ instead of __file__ (#198) (
Browse files Browse the repository at this point in the history
  • Loading branch information
VishMaster17 committed Oct 24, 2022
1 parent 6ecacef commit 5c3569e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion piccolo_api/crud/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
from starlette.routing import BaseRoute


logger = logging.getLogger(__file__)
logger = logging.getLogger(__name__)


OPERATOR_MAP = {
Expand Down
2 changes: 1 addition & 1 deletion piccolo_api/crud/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class UniqueViolationError(Exception): # type: ignore
pass


logger = logging.getLogger(__file__)
logger = logging.getLogger(__name__)


class MalformedQuery(Exception):
Expand Down
2 changes: 1 addition & 1 deletion piccolo_api/media/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from piccolo.apps.user.tables import BaseUser
from piccolo.columns.column_types import Array, Text, Varchar

logger = logging.getLogger(__file__)
logger = logging.getLogger(__name__)


#: Pass into ``allowed_characters`` to just allow audio files.
Expand Down
2 changes: 1 addition & 1 deletion piccolo_api/media/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from concurrent.futures._base import Executor


logger = logging.getLogger(__file__)
logger = logging.getLogger(__name__)


class LocalMediaStorage(MediaStorage):
Expand Down
2 changes: 1 addition & 1 deletion piccolo_api/shared/auth/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
]


logger = logging.getLogger(__file__)
logger = logging.getLogger(__name__)


@dataclasses.dataclass
Expand Down

0 comments on commit 5c3569e

Please sign in to comment.