mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-05-30 15:42:25 +00:00
1.5 KiB
1.5 KiB
BitLogger Update Changes
version 0.4.0
Feature
- feat: add
ColorMode = Never | Auto | Alwaysfor text formatter color control - feat: add ANSI level, target, timestamp, and field rendering to
format_text(...) - feat: add
color_modetoTextFormatterandTextFormatterConfig - feat: support
text_formatter.color_modein JSON config parsing and serialization - feat: add inline style markup support in message text for ANSI text formatter output
- feat: support named color tags like
<red>...</>, style tags like<b>...</>, and hex tags like<#ff0000>...</>/<bg:#010203>...</> - feat: keep JSON formatter output unchanged and limit inline style parsing to text message rendering only
Test
- test: cover ANSI text formatter rendering in
Alwaysmode - test: cover
Automode fallback behavior whenNO_COLORis present - test: cover config parsing and serialization for
color_mode - test: cover named inline color tags in ANSI mode
- test: cover plain mode tag stripping, nested tags, hex tags, and unknown-tag fallback behavior
Example
- docs: add
color_modeusage examples to formatter documentation
Notes
Autocurrently uses a conservative rule: ifNO_COLORexists, ANSI is disabled; otherwise ANSI is enabled- inline style markup currently supports short close
</>only - unknown or invalid inline tags currently fall back to plain text and do not raise formatter errors
- tag registry override and configurable style aliases are planned for a later
0.4batch