Skip to content

Icons

Each theme renders a minimalist Unicode icon next to the level. Defaults (no special fonts required):

LevelIcon
TRACE
DEBUG
INFO
SUCCESS
WARNING!
ERROR
CRITICAL
apply_theme(logger, "dracula", icons=False)

Alignment is preserved — no empty icon slot is left behind.

Pass a mapping to change only certain levels; the rest keep the theme’s icons:

apply_theme(logger, "dracula", icons={"error": "💥", "info": "i"})
from loguru_themes import IconSet, apply_theme
arrows = IconSet(
trace="", debug="", info="", success="",
warning="", error="", critical="",
)
apply_theme(logger, "dracula", icons=arrows)

You can also bake icon changes into a theme (see Customizing):

from loguru_themes import get_theme, apply_theme
theme = get_theme("dracula").with_icon("error", "!!")
apply_theme(logger, theme)