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 "Bruce Brouwer (JIRA)" <ji...@apache.org> on 2014/04/17 14:14:16 UTC

[jira] [Comment Edited] (LOG4J2-547) Update LoggerStream API

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

Bruce Brouwer edited comment on LOG4J2-547 at 4/17/14 12:13 PM:
----------------------------------------------------------------

I like the builder idea too. I was just following the pattern that all other Java related streams take. So I decided to take a stab at it with log4j2-547-builders.patch.

Also in that patch are some things that I missed originally, so here's what it includes:
* LoggerStreams.Builder (and related classes)
* Updated log4j-bom to include streams
* Moved helper classes into a .helpers package

I haven't written the tests because I wanted to hear some feedback on the approach. 


was (Author: bruce.brouwer):
I like the builder idea too. I was just following the pattern that all other Java related streams take. So I decided to take a stab at it with log4j2-547-builders-and-more.patch.

Also in that patch are some things that I missed originally, so here's what it includes:
* Builders
* Updated log4j-bom to include streams
* Moved helper classes into a .helpers package

I haven't written the tests because I wanted to hear some feedback on the approach. 

> Update LoggerStream API
> -----------------------
>
>                 Key: LOG4J2-547
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-547
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 2.0-rc1
>            Reporter: Matt Sicker
>            Assignee: Ralph Goers
>             Fix For: 2.0-rc2
>
>         Attachments: 0001-PrintStream-API-update.patch, MyBenchmark.java, PerfTestCalcLocation.java, log4j2-547-bbrouwer.patch, log4j2-547-builders.patch, log4j2-547-new-module.patch, log4j2-547-remove-streams.patch, log4j2-loggerStream.patch
>
>
> I've got some ideas on how to improve the LoggerStream idea that I added a little while ago. The main thing I'd like to do is extract an interface from it, rename the default implementation to SimpleLoggerStream (part of the SimpleLogger stuff), and allow log4j implementations to specify a different implementation if desired.
> In doing this, I'm not sure where specifically I'd prefer the getStream methods to be. Right now, it's in Logger, but really, it could be in LoggerContext instead. I don't think I should be required to get a Logger just to get a LoggerStream.
> Now if only the java.io package used interfaces instead of classes. This would be so much easier to design!



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org