Logger
pyticktick.logger
#
Logging workound to use Loguru in conjunction with the standard logging module.
Warning
Users are not expected to use the module directly, this is for internal use only. It is being documented for transparency and to provide context in case users encounter any issues.
This module contains a workaround when a function expects the standard logging module
but you want to use Loguru. This is done by creating a custom logging handler that
sends logs to Loguru. This is intended to be used in rare cases, such as with tenacity.
You should use from loguru import logger
for all other logging needs.
This module was taken from Delgan/loguru#969 (comment) and is endorsed as the best current workaround by the author of Loguru.
Example
from loguru import logger
from pyticktick.logger import _logger
logger.info("This is a Loguru message")
_logger.info("This is a standard logging message that will be sent to Loguru")