Skip to content

Commit

Permalink
Complete the "Troubleshooting" docs with more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Delgan committed Dec 1, 2024
1 parent 7f5001f commit 6161a13
Show file tree
Hide file tree
Showing 3 changed files with 423 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/api/type_hints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ A basic usage example could look like this:
logger.add(good_sink, filter=bad_filter)
.. code-block:: bash
.. code-block::
$ mypy test.py
test.py:8: error: TypedDict "Record" has no key 'invalid'
Expand Down
8 changes: 8 additions & 0 deletions docs/resources/recipes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ The logger is pre-configured for convenience with a default handler which writes
logger.add(sys.stderr, level="WARNING")
.. _changing-level-of-existing-handler:

Changing the level of an existing handler
-----------------------------------------

Expand Down Expand Up @@ -194,6 +196,8 @@ Finally, more advanced control over handler's level can be achieved by using a c
logger.debug("Not logged")


.. _configuring-loguru-as-lib-or-app:

Configuring Loguru to be used by a library or an application
------------------------------------------------------------

Expand Down Expand Up @@ -889,6 +893,8 @@ You can update the default ``format`` of your handlers and omit the uninterestin
Note that the ``"name"`` attribute of the log record is set to ``None`` when the frame is unavailable.


.. _creating-independent-loggers:

Creating independent loggers with separate set of handlers
----------------------------------------------------------

Expand Down Expand Up @@ -938,6 +944,8 @@ Now, supposing that you have a lot of these tasks. It may be a bit cumbersome to
Note that you may encounter errors if you try to copy a ``logger`` to which non-picklable handlers have been added. For this reason, it is generally advised to remove all handlers before calling ``copy.deepcopy(logger)``.


.. _multiprocessing-compatibility:

Compatibility with ``multiprocessing`` using ``enqueue`` argument
-----------------------------------------------------------------

Expand Down
Loading

0 comments on commit 6161a13

Please sign in to comment.