Skip to content

Commit 9886f8b

Browse files
pdb5627michaelosthege
authored andcommitted
Change logger names from all "pymc" to module name (__name__)
1 parent f632a34 commit 9886f8b

File tree

15 files changed

+63
-35
lines changed

15 files changed

+63
-35
lines changed

pymc/__init__.py

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

1717
import logging
1818

19-
_log = logging.getLogger("pymc")
19+
_log = logging.getLogger(__name__)
2020

2121
if not logging.root.handlers:
2222
_log.setLevel(logging.INFO)

pymc/backends/arviz.py

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

4747
___all__ = [""]
4848

49-
_log = logging.getLogger("pymc")
49+
_log = logging.getLogger(__name__)
5050

5151
# random variable object ...
5252
Var = Any # pylint: disable=invalid-name

pymc/backends/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
from pymc.model import modelcontext
4343
from pymc.util import get_var_name
4444

45-
logger = logging.getLogger("pymc")
45+
logger = logging.getLogger(__name__)
4646

4747

4848
class BackendError(Exception):

pymc/backends/mcbackend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
flatten_steps,
3838
)
3939

40-
_log = logging.getLogger("pymc")
40+
_log = logging.getLogger(__name__)
4141

4242

4343
def find_data(pmodel: Model) -> List[mcb.DataVariable]:

pymc/backends/report.py

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

2020
from pymc.stats.convergence import _LEVELS, SamplerWarning
2121

22-
logger = logging.getLogger("pymc")
22+
logger = logging.getLogger(__name__)
2323

2424

2525
class SamplerReport:

pymc/distributions/simulator.py

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

3030
__all__ = ["Simulator"]
3131

32-
_log = logging.getLogger("pymc")
32+
_log = logging.getLogger(__name__)
3333

3434

3535
class SimulatorRV(RandomVariable):

pymc/ode/ode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from pymc.exceptions import DtypeError, ShapeError
2727
from pymc.ode import utils
2828

29-
_log = logging.getLogger("pymc")
29+
_log = logging.getLogger(__name__)
3030
floatX = pytensor.config.floatX
3131

3232

pymc/sampling/forward.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
ArrayLike: TypeAlias = Union[np.ndarray, List[float]]
8181
PointList: TypeAlias = List[PointType]
8282

83-
_log = logging.getLogger("pymc")
83+
_log = logging.getLogger(__name__)
8484

8585

8686
def get_vars_in_point_list(trace, model):

pymc/sampling/mcmc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def __call__(self, trace: IBaseTrace, draw: Draw):
8686
pass
8787

8888

89-
_log = logging.getLogger("pymc")
89+
_log = logging.getLogger(__name__)
9090

9191

9292
def instantiate_steppers(

pymc/sampling/parallel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from pymc.exceptions import SamplingError
3333
from pymc.util import RandomSeed
3434

35-
logger = logging.getLogger("pymc")
35+
logger = logging.getLogger(__name__)
3636

3737

3838
class ParallelSamplingError(Exception):

0 commit comments

Comments
 (0)