Skip to content

Commit f4880d1

Browse files
authored
fix(client) Align logger names with package name (#572)
* fix(client) Align logger names with package name I missed fixing some logger names when porting code from sentry. Refs getsentry/launchpad#582 * Align logging scopes more * Align on __name__ as that is the convention we use most often
1 parent 56919af commit f4880d1

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

clients/python/src/taskbroker_client/scheduler/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from taskbroker_client.scheduler.schedules import CrontabSchedule, Schedule, TimedeltaSchedule
1818
from taskbroker_client.task import Task
1919

20-
logger = logging.getLogger("taskworker.scheduler")
20+
logger = logging.getLogger(__name__)
2121

2222
if TYPE_CHECKING:
2323
from sentry_sdk._types import MonitorConfig

clients/python/src/taskbroker_client/scheduler/schedules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
if TYPE_CHECKING:
1313
from sentry_sdk._types import MonitorConfigScheduleUnit
1414

15-
logger = logging.getLogger("taskworker.scheduler")
15+
logger = logging.getLogger(__name__)
1616

1717

1818
class Schedule(metaclass=abc.ABCMeta):

clients/python/src/taskbroker_client/worker/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from taskbroker_client.metrics import MetricsBackend
2828
from taskbroker_client.types import InflightTaskActivation, ProcessingResult
2929

30-
logger = logging.getLogger("sentry.taskworker.client")
30+
logger = logging.getLogger(__name__)
3131

3232
MAX_ACTIVATION_SIZE = 1024 * 1024 * 10
3333
"""Max payload size we will process."""

clients/python/src/taskbroker_client/worker/worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
)
3131
from taskbroker_client.worker.workerchild import child_process
3232

33-
logger = logging.getLogger("sentry.taskworker.worker")
33+
logger = logging.getLogger(__name__)
3434

3535

3636
class TaskWorker:

clients/python/src/taskbroker_client/worker/workerchild.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from taskbroker_client.task import Task
3333
from taskbroker_client.types import InflightTaskActivation, ProcessingResult
3434

35-
logger = logging.getLogger("sentry.taskworker.worker")
35+
logger = logging.getLogger(__name__)
3636

3737

3838
class ProcessingDeadlineExceeded(BaseException):

0 commit comments

Comments
 (0)