Files
xahaud/Builds
Nicholas Dudfield 1e698ed194 feat(logging): add enhanced logging with colors and flexible formatting
- Add BEAST_ENHANCED_LOGGING CMake option for build-time control
- Implement file:line logging with customizable position (prefix/suffix/none)
  via LOG_LOCATION_POSITION env var (defaults to suffix for readability)
- Add flexible timestamp formatting via LOG_DATE_FORMAT (date::format syntax)
- Add local timezone support via LOG_DATE_LOCAL env var
- Support customizable highlight colors via LOG_HIGHLIGHT_ESCAPE env var
  (red, green, yellow, blue, magenta, cyan, white, gray, orange, none)
- Apply consistent highlighting to both file:line and partition:severity
- Centralize all enhanced logging features in beast_EnhancedLogging module
- Smart TTY detection with NO_COLOR/FORCE_COLOR support
- Constexpr path stripping using SOURCE_ROOT_PATH
- Move implementations to .cpp files to minimize recompilation
- Update zlib to 1.3.1 to fix macOS 15.5 build issues
- Enable date-tz library for timezone support

Example output with defaults:
  2025-Jul-26 15:20:07.124745 NetworkOPs:NFO STATE->connected [ripple/app/misc/NetworkOPs.cpp:2264]

Environment variables:
  LOG_LOCATION_POSITION=suffix  # or prefix, none
  LOG_HIGHLIGHT_ESCAPE=cyan     # or red, green, yellow, etc
  LOG_DATE_FORMAT=%Y-%b-%d %r.%f %Z  # custom timestamp format
  LOG_DATE_LOCAL=1              # use local timezone

Zero runtime cost when disabled - all features are build-time conditional.
Backward compatible - no changes when BEAST_ENHANCED_LOGGING is not defined.
2025-07-26 16:54:32 +07:00
..
2023-03-28 15:55:53 -07:00