- More intuitive naming for users
- Changed get_log_highlight_escape() to get_log_highlight_color()
- Updated all references and comments
- Functionality remains the same, just clearer naming
- 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.
- Add LOG_LOCATION_POSITION env var to control file:line placement (prefix/suffix/none)
- Add LOG_DATE_FORMAT env var for custom timestamp formats (supports date::format syntax)
- Add LOG_DATE_LOCAL env var to use local timezone instead of UTC
- Add LOG_LOCATION_ESCAPE env var for custom colors (red/green/cyan/etc)
- Default to suffix position for better readability
- Move implementation to .cpp files to reduce recompilation
- Update zlib to 1.3.1 to fix macOS build issues
- Enable date-tz library for timezone support
Per issue #2354, when the log level of a server was configured at
"trace", sensitive keying meterial generated by the `wallet_propose`
command could be written to the server's log file, if one was
configured.
This commit improves the log scrubbing code to account for the
sensitive information generated by a `wallet_propose`.
** Important security consideration **
We still caution everyone *against* executing this command on a
server that they do not control: a malicious server operator could
intercept the generated keypair, or operate a modified server that
returns keypairs that are not securely generated.
Previously, writes using debugLog() tagged every entry with
"TRC:". Now users of debugLog() must specify the severity
level they want their information logged at.
Replace Journal public data members with member function accessors
in order to make Journal lighter weight. The change makes a
Journal cheaper to pass by value.
Also add missing stream checks (e.g., calls to JLOG) to avoid
text processing that ultimately will not be stored in the log.
The Journal API is affected. There are two uses for the
Journal::Severity enum:
o It is used to declare a threshold which log messages must meet
in order to be logged.
o It declares the current logging level which will be compared
to the threshold.
Those uses that affect the threshold are now named threshold()
rather than severity() to make the uses easier to distinguish.
Additionally, Journal no longer carries a Severity variable.
All handling of the threshold() is now delegated to the
Journal::Sink.
Sinks are no longer constructed with a default threshold of
kWarning; their threshold must be passed in on construction.
An alternative to the unity build, the classic build compiles each
translation unit individually. This adds more modules to the classic build:
* Remove unity header app.h
* Add missing includes as needed
* Remove obsolete NodeStore backend code
* Add app/, core/, crypto/, json/, net/, overlay/, peerfinder/ to classic build
The SConstruct is modified to provide a new family of targets, ending with
the suffix ".nounity", which compile individual translation units instead of
some of the unity translation units ("classic" builds). Two modules updated
for this treatment are ripple/basics/ and ripple/protocol/, with plans to
update more in the future. A consequence is longer build times in some cases.
A benefit of classic builds is that missing includes can be identified
through compiler errors.