Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.5
Description
Currently, the preferred way of logging character sequences in log4j 2 is by passing in tokens of type java.lang.String. It would be very beneficial if the API could provide methods that take java.lang.CharSequence tokens. This would allow high performance zero or low-GC applications to re-use the existing mutable structures implementing java.lang.CharSequence for continuous logging without new objects being created.
A high-performance implementation of the logger would be expected to copy out the contents of a single or multiple instances of java.lang.CharSequence so that they could be re-used in the subsequent logging call.
Attachments
Issue Links
- is related to
-
LOG4J2-1329 API change: let Message.getFormattedMessage() return CharSequence instead of String
- Closed