pypi / loguru
loguru
What changed in loguru 0.8, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-12.
4 breaking1 security5 new APIs and options1 behavior and defaults16 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initloguru 0.827 changes
Breaking changes 4
Standard logging Handler sinks now respect their .level attribute.
The default log format now includes the timezone offset, producing less ambiguous logs.
When colorize is not provided, the NO_COLOR environment variable disables color output by default.
Colorization requires the TERM environment variable not to be "dumb".
Security 1
Fixes a possible regular expression denial of service when parsing strings containing long sequences of backslashes.
New APIs and options 5
When colorize is not provided, the FORCE_COLOR environment variable enables color output by default.
Adds logger.reinstall() to automatically set up the logger in spawned child processes.
Adds record["template"] containing the raw, unformatted message.
File sinks now accept a list of rotation conditions; any condition in the list can trigger rotation.
Template strings can now be used as log messages.
Behavior and default changes 1
logger.catch() can now be used as an asynchronous context manager.
Fixes and other changes 16
Fixes expansion of short hex color codes.
Fixes formatting of truncated ExceptionGroup errors, including incorrect singular/plural wording and a missing closing ruler.
Avoids a possible internal error with frame objects missing an f_lineno value.
Fixes thread and process identifiers in standard logging Handler records when enqueue=True.
Fixes externally raised exceptions causing invalid state and repeated RuntimeError errors related to avoided deadlocks.
catch=True is now honored for exceptions raised during sink termination, including file retention or compression triggered by logger.remove().
Invalid format keys in logger format strings now provide improved feedback.
logger.catch() is now compatible with asynchronous generators.
When given a path, logger.parse() now decodes log files as UTF-8 instead of using the locale encoding.
Fixes formatting of record["time"] when using zoneinfo.ZoneInfo timezones.
Fixes parsing of 12-hour rotation times that omit seconds.
A “<weekday> at <time>” rotation no longer incorrectly fires its first rotation on the creation day when the requested weekday is later.
Fixes a possible ValueError on Windows when the system clock is set far ahead in the future.
Fixes formatting of negative timezone offsets with sub-minute components.
Fixes formatting of negative timestamps.
Fixes the microsecond value when formatting the log timestamp using {time:x}.