Skip to content

Commit 66d6de1

Browse files
committed
Replace docs URL with cross reference in log()
1 parent 27ccbb7 commit 66d6de1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/resources/troubleshooting.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ Note that this only affects handlers that do not explicitly configure their leve
105105
:ref:`Changing the level of an existing handler <changing-level-of-existing-handler>`
106106

107107

108+
.. _anonymous_levels:
109+
108110
Why isn't the level name shown when using an integer or a built-in level?
109111
-------------------------------------------------------------------------
110112

loguru/_logger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
.. _multiprocessing.Context:
7070
https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods
7171
72-
.. _FAQ anonymous levels: https://loguru.readthedocs.io/en/latest/resources/troubleshooting.html#why-isn-t-the-level-name-shown-when-using-an-integer-or-a-built-in-level
72+
.. |FAQ anonymous levels| replace:: :ref:`FAQ anonymous levels <anonymous_levels>`
7373
7474
.. |better_exceptions| replace:: ``better_exceptions``
7575
.. _better_exceptions: https://github.com/Qix-/better-exceptions
@@ -2205,7 +2205,7 @@ def log(__self, __level, __message, *args, **kwargs): # noqa: N805
22052205
r"""Log ``message.format(*args, **kwargs)`` with severity ``level``.
22062206
22072207
Note that if an |int| is provided as ``level``, the level is interpreted as an anonymous
2208-
one and displayed as such (see also `FAQ anonymous levels`_ for more details).
2208+
one and displayed as such (see also |FAQ anonymous levels| for more details).
22092209
"""
22102210
__self._log(__level, False, __self._options, __message, args, kwargs)
22112211

0 commit comments

Comments
 (0)