unstale

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 init

@unstale/cli 0.3.0 on npm

loguru 0.827 changes

Breaking changes 4

  • Standard logging Handler sinks now respect their .level attribute.

    0.8.0release notes

  • The default log format now includes the timezone offset, producing less ambiguous logs.

    0.8.0release notes

  • When colorize is not provided, the NO_COLOR environment variable disables color output by default.

    0.8.0release notes

  • Colorization requires the TERM environment variable not to be "dumb".

    0.8.0release notes

Security 1

  • Fixes a possible regular expression denial of service when parsing strings containing long sequences of backslashes.

    0.8.0release notes

New APIs and options 5

  • When colorize is not provided, the FORCE_COLOR environment variable enables color output by default.

    0.8.0release notes

  • Adds logger.reinstall() to automatically set up the logger in spawned child processes.

    0.8.0release notes

  • Adds record["template"] containing the raw, unformatted message.

    0.8.0release notes

  • File sinks now accept a list of rotation conditions; any condition in the list can trigger rotation.

    0.8.0release notes

  • Template strings can now be used as log messages.

    0.8.0release notes

Behavior and default changes 1

  • logger.catch() can now be used as an asynchronous context manager.

    0.8.0release notes

Fixes and other changes 16

  • Fixes expansion of short hex color codes.

    0.8.0release notes

  • Fixes formatting of truncated ExceptionGroup errors, including incorrect singular/plural wording and a missing closing ruler.

    0.8.0release notes

  • Avoids a possible internal error with frame objects missing an f_lineno value.

    0.8.0release notes

  • Fixes thread and process identifiers in standard logging Handler records when enqueue=True.

    0.8.0release notes

  • Fixes externally raised exceptions causing invalid state and repeated RuntimeError errors related to avoided deadlocks.

    0.8.0release notes

  • catch=True is now honored for exceptions raised during sink termination, including file retention or compression triggered by logger.remove().

    0.8.0release notes

  • Invalid format keys in logger format strings now provide improved feedback.

    0.8.0release notes

  • logger.catch() is now compatible with asynchronous generators.

    0.8.0release notes

  • When given a path, logger.parse() now decodes log files as UTF-8 instead of using the locale encoding.

    0.8.0release notes

  • Fixes formatting of record["time"] when using zoneinfo.ZoneInfo timezones.

    0.8.0release notes

  • Fixes parsing of 12-hour rotation times that omit seconds.

    0.8.0release notes

  • A “<weekday> at <time>” rotation no longer incorrectly fires its first rotation on the creation day when the requested weekday is later.

    0.8.0release notes

  • Fixes a possible ValueError on Windows when the system clock is set far ahead in the future.

    0.8.0release notes

  • Fixes formatting of negative timezone offsets with sub-minute components.

    0.8.0release notes

  • Fixes formatting of negative timestamps.

    0.8.0release notes

  • Fixes the microsecond value when formatting the log timestamp using {time:x}.

    0.8.0release notes