Re: FlowMessageFactory

2016-02-18 Thread Remko Popma
I see, so there actually is a use case to remove the need for the isTraceEnabled check with the Supplier param... Sent from my iPhone > On 2016/02/19, at 14:10, Ralph Goers wrote: > > The use case I wanted to do this for is: > > LOGGER.entry(“Request: “, ()->gson.toJson(request)); > . > LOGGE

Re: FlowMessageFactory

2016-02-18 Thread Ralph Goers
The use case I wanted to do this for is: LOGGER.entry(“Request: “, ()->gson.toJson(request)); . LOGGER.exit(response, ()->gson.toJson(response)); However this can be handled just as easily by LOGGER.entry(new JsonMessage(request)); . LOGGER.exit(response, new JsonMessage(response)); so I can li

[jira] [Reopened] (LOG4J2-1280) Logger methods taking Supplier parameters should check if supplied value is Message

2016-02-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Remko Popma reopened LOG4J2-1280: - Taking a long hard look at my own work from last night I see I made a mistake. {code} protected void

[jira] [Comment Edited] (LOG4J2-1280) Logger methods taking Supplier parameters should check if supplied value is Message

2016-02-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153692#comment-15153692 ] Remko Popma edited comment on LOG4J2-1280 at 2/19/16 4:26 AM: -

Re: FlowMessageFactory

2016-02-18 Thread Gary Gregory
On Feb 18, 2016 5:38 PM, "Remko Popma" wrote: > > I would start with just a default FlowMessageFactory. Configurable with a system property, so users can swap in their own if they want. > > Only if the need arises to configure FlowMessageFactories on a per-logger basis, we can consider adding the

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

2016-02-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153594#comment-15153594 ] Remko Popma commented on LOG4J2-1255: - Taking another good hard look at this, we curr

Re: FlowMessageFactory

2016-02-18 Thread Remko Popma
I would start with just a default FlowMessageFactory. Configurable with a system property, so users can swap in their own if they want. Only if the need arises to configure FlowMessageFactories on a per-logger basis, we can consider adding the methods to LogManager to support that. So no need for

Re: FlowMessageFactory

2016-02-18 Thread Gary Gregory
On Thu, Feb 18, 2016 at 4:22 PM, Ralph Goers wrote: > Is it really necessary to have getLogger support FlowMessageFactory? > These messages are really meant as wrappers for other messages. so I am not > even sure what it would mean for getLogger() to support that. How would it > know what Message

Re: FlowMessageFactory

2016-02-18 Thread Ralph Goers
Is it really necessary to have getLogger support FlowMessageFactory? These messages are really meant as wrappers for other messages. so I am not even sure what it would mean for getLogger() to support that. How would it know what Message it is wrapping? I am really getting sorry that I started

[jira] [Commented] (LOG4J2-1279) NullPointerException in FastDateParser$TimeZoneStrategy

2016-02-18 Thread Matt Sicker (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153396#comment-15153396 ] Matt Sicker commented on LOG4J2-1279: - Might as well. Would it be possible to use the

Re: FlowMessageFactory

2016-02-18 Thread Remko Popma
On Friday, 19 February 2016, Gary Gregory wrote: > On Thu, Feb 18, 2016 at 2:13 PM, Remko Popma > wrote: > >> I think preserving binary compatibility on its own is a strong reason for >> doing this, but it's more than that. >> > > OK, since org.apache.logging.log4j.message.MessageFactory is in l

Re: FlowMessageFactory

2016-02-18 Thread Gary Gregory
On Thu, Feb 18, 2016 at 2:13 PM, Remko Popma wrote: > I think preserving binary compatibility on its own is a strong reason for > doing this, but it's more than that. > OK, since org.apache.logging.log4j.message.MessageFactory is in log4j-api that's important. I can buy that. BUT, we are also ad

Re: [2/2] logging-log4j2 git commit: LOG4J2-1255 javadoc fix

2016-02-18 Thread Remko Popma
np. :-) Sent from my iPhone > On 2016/02/19, at 7:16, Gary Gregory wrote: > > I was just having fun ;-) > >> On Thu, Feb 18, 2016 at 2:03 PM, Remko Popma wrote: >> Yes, slip up. Sorry. >> >> Sent from my iPhone >> >>> On 2016/02/19, at 2:30, Gary Gregory wrote: >>> >>> Hey, that's not a

Re: [2/2] logging-log4j2 git commit: LOG4J2-1255 javadoc fix

2016-02-18 Thread Gary Gregory
I was just having fun ;-) On Thu, Feb 18, 2016 at 2:03 PM, Remko Popma wrote: > Yes, slip up. Sorry. > > Sent from my iPhone > > On 2016/02/19, at 2:30, Gary Gregory wrote: > > Hey, that's not a Javadoc fix ;-) > > Gary > > -- Forwarded message -- > From: > Date: Thu, Feb 18, 2

Re: FlowMessageFactory

2016-02-18 Thread Remko Popma
I think preserving binary compatibility on its own is a strong reason for doing this, but it's more than that. Having a separate factory for flow messages makes both factories more cohesive (single responsibility principle). No need for one factory to extend the other in my view. The logger

Re: [2/2] logging-log4j2 git commit: LOG4J2-1255 javadoc fix

2016-02-18 Thread Remko Popma
Yes, slip up. Sorry. Sent from my iPhone > On 2016/02/19, at 2:30, Gary Gregory wrote: > > Hey, that's not a Javadoc fix ;-) > > Gary > > -- Forwarded message -- > From: > Date: Thu, Feb 18, 2016 at 7:18 AM > Subject: [2/2] logging-log4j2 git commit: LOG4J2-1255 javadoc fix

[jira] [Commented] (LOG4J2-1279) NullPointerException in FastDateParser$TimeZoneStrategy

2016-02-18 Thread Gary Gregory (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15152758#comment-15152758 ] Gary Gregory commented on LOG4J2-1279: -- I think there are other fixes in LANG, maybe

Fwd: [2/2] logging-log4j2 git commit: LOG4J2-1255 javadoc fix

2016-02-18 Thread Gary Gregory
Hey, that's not a Javadoc fix ;-) Gary -- Forwarded message -- From: Date: Thu, Feb 18, 2016 at 7:18 AM Subject: [2/2] logging-log4j2 git commit: LOG4J2-1255 javadoc fix To: [email protected] LOG4J2-1255 javadoc fix Project: http://git-wip-us.apache.org/repos/asf/log

Re: FlowMessageFactory

2016-02-18 Thread Gary Gregory
Is a flow message factory a kind of message factory or a different kind of factory? Does a logger need instances of both or just the one? Since entry message extends message, should the factory do so as well? Gary, phone, typos. On Feb 18, 2016 8:44 AM, "Remko Popma" wrote: > Would anyone mind

[jira] [Updated] (LOG4J2-1279) NullPointerException in FastDateParser$TimeZoneStrategy

2016-02-18 Thread Tony Baines (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tony Baines updated LOG4J2-1279: Priority: Minor (was: Major) > NullPointerException in FastDateParser$TimeZoneStrategy > -

FlowMessageFactory

2016-02-18 Thread Remko Popma
Would anyone mind terribly if I factored out the FlowMessage creation methods from MessageFactory to a new interface FlowMessageFactory? Concretely, this interface would contain the methods introduced in LOG4J2-1255: EntryMessage newEntryMessage(Message message); ExitMessage newExitMessage(Object

[jira] [Commented] (LOG4J2-1279) NullPointerException in FastDateParser$TimeZoneStrategy

2016-02-18 Thread ASF GitHub Bot (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15152566#comment-15152566 ] ASF GitHub Bot commented on LOG4J2-1279: GitHub user tonybaines opened a pull req

Re: MessageSupplier and Supplier

2016-02-18 Thread Remko Popma
I addressed the problem in https://issues.apache.org/jira/browse/LOG4J2-1280 LambdaUtil now correctly handles the case where Suppliers returns a Message object. I believe that MessageSupplier can now be deprecated. It may also make sense to remove the new traceEntry/traceExit methods introduced i

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

2016-02-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Remko Popma resolved LOG4J2-1255. - Resolution: Fixed Fixed the issue with AbstractMessage.toString() being necessary to work around

[jira] [Commented] (LOG4J2-1280) Logger methods taking Supplier parameters should check if supplied value is Message

2016-02-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15152456#comment-15152456 ] Remko Popma commented on LOG4J2-1280: - I believe the MessageSupplier interface can no

[jira] [Resolved] (LOG4J2-1280) Logger methods taking Supplier parameters should check if supplied value is Message

2016-02-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Remko Popma resolved LOG4J2-1280. - Resolution: Fixed Fixed in master in commit a56f420. > Logger methods taking Supplier parameters

[jira] [Closed] (LOG4J2-1280) Logger methods taking Supplier parameters should check if supplied value is Message

2016-02-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Remko Popma closed LOG4J2-1280. --- > Logger methods taking Supplier parameters should check if supplied value > is Message > --

[jira] [Created] (LOG4J2-1280) Logger methods taking Supplier parameters should check if supplied value is Message

2016-02-18 Thread Remko Popma (JIRA)
Remko Popma created LOG4J2-1280: --- Summary: Logger methods taking Supplier parameters should check if supplied value is Message Key: LOG4J2-1280 URL: https://issues.apache.org/jira/browse/LOG4J2-1280 Pro

[jira] [Created] (LOG4J2-1279) NullPointerException in FastDateParser$TimeZoneStrategy

2016-02-18 Thread Tony Baines (JIRA)
Tony Baines created LOG4J2-1279: --- Summary: NullPointerException in FastDateParser$TimeZoneStrategy Key: LOG4J2-1279 URL: https://issues.apache.org/jira/browse/LOG4J2-1279 Project: Log4j 2 Issue

[jira] [Comment Edited] (LOG4J2-1271) ParameterizedMessage optimization

2016-02-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15152109#comment-15152109 ] Remko Popma edited comment on LOG4J2-1271 at 2/18/16 10:37 AM:

[jira] [Commented] (LOG4J2-1271) ParameterizedMessage optimization

2016-02-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15152109#comment-15152109 ] Remko Popma commented on LOG4J2-1271: - Something like this: {code} private void appen

[jira] [Comment Edited] (LOG4J2-1270) Garbage-free steady-state logging

2016-02-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15152099#comment-15152099 ] Remko Popma edited comment on LOG4J2-1270 at 2/18/16 10:28 AM:

[jira] [Commented] (LOG4J2-1270) Garbage-free steady-state logging

2016-02-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15152099#comment-15152099 ] Remko Popma commented on LOG4J2-1270: - I found why the "NoGC" test was not completely

[jira] [Comment Edited] (LOG4J2-1271) ParameterizedMessage optimization

2016-02-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15151915#comment-15151915 ] Remko Popma edited comment on LOG4J2-1271 at 2/18/16 8:32 AM: -

[jira] [Commented] (LOG4J2-1271) ParameterizedMessage optimization

2016-02-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15151915#comment-15151915 ] Remko Popma commented on LOG4J2-1271: - Well darn, you're right of course! I would li