ppkarwasz commented on PR #1147:
URL: https://github.com/apache/logging-log4j2/pull/1147#issuecomment-1364651560
@rgoers,
I have implemented support for all `Logger` methods, except
`traceEntry/traceExit`. These need to create non-trivial lambdas, e.g.:
```lang-java
EntryMessage entry = logger.traceEntry(format, obj1, obj2)
```
would become
```lang-java
EntryMessage entry;
if (logger.isTraceEnabled()) {
entry = ... (equivalent to AbstractLogger.entryMsg) ...
logger.atTrace()
.withLocation(...)
.withMarker(AbstractLogger.ENTRY_MARKER)
.log(entry);
} else {
entry = null;
}
```
Do we even need location support for these methods? If so, it would be
easier to add all least a part of the 10 `traceEntry/traceExit` methods to
`LogBuilder`, but I would want to fill that interface with too many methods.
Otherwise this PR is ready to go.
--
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]