ppkarwasz commented on PR #1147:
URL: https://github.com/apache/logging-log4j2/pull/1147#issuecomment-1328659577

   Regarding the methods not supported by this PR (or supported in a convoluted 
way):
   
   - `catching` and `throwing` requires hardcoding the "Catching" and 
"Throwing" messages used in Log4j2 Core,
   - `traceEntry` and `traceExit` require more work, maybe we can add them to 
`LogBuilder`,
   - `printf` could be rewritten as a `Supplier<Message>` lambda that calls the 
appropriate message factory,
   - apparently I missed `logMessage` that can be easily rewritten in terms of 
`LogBuilder` (although I don't expect it to be used in user code),
   - support for `info(MessageSupplier)` is excessively convoluted: I need to 
wrap it in a new `Supplier<Message>` lambda. This could be simplified if either:
      1. `MessageSupplier` were to extend 
`org.apache.logging.log4j.Supplier<Message>` (probably a non breaking change) or
      2. `LogBuilder.log(org.apache.logging.log4j.Supplier<Message>` was 
replaced with `LogBuilder.log(java.util.function.Supplier<Message>`.
   - support for `info(Supplier<?>)` is also not straightforward: I need to 
rewrite it as `info("{}", supplier)` first. This could be simplified if 
`LogBuilder.log(Supplier<Message>)` was replaced with 
`LogBuilder.log(Supplier<?>)` (+ some changes in the implementation).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to