You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2016/02/13 16:03:18 UTC

[jira] [Commented] (LOG4J2-1255) Logger.entry and Logger.exit should support Messages.

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

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

Sorry to start commenting at this late stage, but I don't understand...

I don't see how the use case that Gary describes above is covered by the recent additions to master (both Ralph and Gary's changes). Perhaps I am missing something, but to me it seems we have added a lot of infrastructure (14 new methods on Logger, 3 new interfaces, 4 new classes) in order to automatically prefix trace messages with "enter" and "exit". This does not seem like a good trade-off...

I would think it was worth it if client code would no longer need to take care of tracking the method name and parameters (implemented in {{getFormattedMethod}} in the above example), but as far as I can see that is not the case. In spite of our efforts, client code will not be much shorter.

On the other hand, the discussion in LOG4J2-33 seems to be about providing an alternative solution for the same problem. Shall we hold off on the changes for this ticket until we get more clarity about the annotation-based approach in LOG4J2-33?

> 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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org