Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.11.2
-
None
-
None
Description
In LOG4J2-1255, ggregory stated that he doesn't have a use case for traceExit(R, String, Supplier...) : R.
Here is one:
- R.toString() only produces inadequate information (worst case: it defaults to Object.toString()).
To cope with this, I would like to do the following:
return LOG.traceExit(result, () -> SomeExpensiveToStringHelper.toString(result));
For Logger.traceEntry I already do it like this for those types R which have an inadequate toString() method, but for traceExit I cannot.
So please add traceExit(String, R, Supplier...) : R (Note that the first two parameters have changed places since the original discussion, to mirror the existing traceExit(String, R) : R.)