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

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

Gary, it may be better to have the R (result) as the first parameter in 
{{traceExit}} methods, to make it easier to have methods that take varargs. 
Would you want separate {{traceExit(Message)}} and {{traceExit(EntryMessage)}} 
methods or can these be combined?

The below includes both Ralph's and Gary's use cases AFAICS. Thoughts?
{code}
traceEntry() : EntryMessage
traceEntry(String, Object...) : EntryMessage
traceEntry(Message) : EntryMessage

//Logs and returns new EntryMessage(
//        "Entry", new ParameterizedMessage(String, 
LambdaUtil.getAll(suppliers)))
traceEntry(String, Supplier...) : EntryMessage

traceExit() : void
traceExit(R) : R
traceExit(R, String) : R

// if Message is an EntryMessage, its nested message is logged
traceExit(Message) : void

// if Message is an EntryMessage, its nested message is logged
traceExit(R, Message) : R

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

> 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