Closed teddyrasmussen closed 1 week ago
Hi.
Since Rich is based on standard logging
module, and because standard logging
module does not have a "success" level, you'll need to add it by yourself using logging.addLevelName()
at the beginning of your script:
logging.addLevelName(25, "SUCCESS")
Then if you want to customize the color, check out this ticket probably: https://github.com/Textualize/rich/issues/1161
That works, thank you so much!!
Great, closing the ticket then. :+1:
I am using
loguru
to log errors/info/whatever in a project, but using it with theRichHandler
for easier formatting. However, the loguru logger has a success mode (loguru.logger.success
) that Rich doesn't seem to support.Reproduceable code:
However,
RichHandler
doesn't seem to support this:Is there any way around this?