Skip to content

Commit 5993329

Browse files
authored
Use __name__ instead of __file__ (#794)
Fixes #787
1 parent 0c083ff commit 5993329

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
from pkg_resources import iter_entry_points
2525

26-
_logger = getLogger(__file__)
26+
_logger = getLogger(__name__)
2727

2828

2929
def run() -> None:

opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
OTEL_PYTHON_DISABLED_INSTRUMENTATIONS,
2929
)
3030

31-
logger = getLogger(__file__)
31+
logger = getLogger(__name__)
3232

3333

3434
def _load_distros() -> BaseDistro:

opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
libraries,
2727
)
2828

29-
logger = logging.getLogger(__file__)
29+
logger = logging.getLogger(__name__)
3030

3131

3232
def _syscall(func):

opentelemetry-instrumentation/src/opentelemetry/instrumentation/dependencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
get_distribution,
1010
)
1111

12-
logger = getLogger(__file__)
12+
logger = getLogger(__name__)
1313

1414

1515
class DependencyConflict:

0 commit comments

Comments
 (0)