[ 
https://issues.apache.org/jira/browse/LOG4J2-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15154000#comment-15154000
 ] 

Remko Popma commented on LOG4J2-1255:
-------------------------------------

Ralph, you mentioned that
{quote}
The use case I wanted to do this for is:
{code}
LOGGER.entry("Request: ", ()-> gson.toJson(request));
...
// I took the liberty to insert "Response: "
LOGGER.exit(response, "Response: ", ()-> gson.toJson(response));
{code}
{quote}

So in addition to the minimum list I proposed above we may need:
{code}
//Logs and returns new EntryMessage(
//        "Entry", new ParameterizedMessage(String, 
LambdaUtil.getAll(suppliers)))
traceEntry(String, Supplier...) : EntryMessage

// Returns R, logs 
//     new ParameterizedMessage(String, LambdaUtil.getAll(suppliers))
traceExit(R, String, Supplier...) : R
{code}

Would that work for everyone?

> Logger.entry and Logger.exit should support Messages.
> -----------------------------------------------------
>
>                 Key: LOG4J2-1255
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1255
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 2.5
>            Reporter: Ralph Goers
>            Assignee: Ralph Goers
>             Fix For: 2.6
>
>
> Logger.entry and Logger.exit currently do not support Message objects. This 
> reduces the flexibility of what can be logged on entry and exit to methods.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to