[ 
https://issues.apache.org/jira/browse/LOG4J2-2639?focusedWorklogId=266952&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-266952
 ]

ASF GitHub Bot logged work on LOG4J2-2639:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Jun/19 19:03
            Start Date: 25/Jun/19 19:03
    Worklog Time Spent: 10m 
      Work Description: carterkozak commented on issue #284: LOG4J2-2639 - 
Allow logging calls to be constructed using a builder pattern
URL: https://github.com/apache/logging-log4j2/pull/284#issuecomment-505579381
 
 
   > There should be no risk of a memory leak if log() is not called. The 
LogBuilders are owned by a thread local. If log() is not called then the next 
call to an "at" method would clear them for re-use. Even if one was dynamically 
created it would be garbage collected as soon as the it went out of scope.
   
   Some applications record errors infrequently, I don't think it's sufficient 
to hold the previous parameters until the next time a logger is used with an 
enabled level. I've fixed a couple permutations of this issue in our existing 
message/event implementations based on third party bug reports.
   
   I don't think it's a problem if we hold a reference to an object array of 
null values, but if we hold references to dynamically provided parameter 
objects I think it can cause issues.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 266952)
    Time Spent: 6h  (was: 5h 50m)

> Allow log event to be created using the builder pattern.
> --------------------------------------------------------
>
>                 Key: LOG4J2-2639
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2639
>             Project: Log4j 2
>          Issue Type: Task
>          Components: API
>    Affects Versions: 3.0.0
>            Reporter: Ralph Goers
>            Priority: Major
>          Time Spent: 6h
>  Remaining Estimate: 0h
>
> In some cases it would be convenient to create log events using a builder 
> pattern. One advantage of this approach is that it would allow the location 
> information to be more easily provided.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to