Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-547

Update LoggerStream API

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-rc1
    • 2.1
    • API
    • None

    Description

      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!

      Attachments

        1. 0001-PrintStream-API-update.patch
          48 kB
          Matt Sicker
        2. log4j2-547-bbrouwer.patch
          81 kB
          Bruce Brouwer
        3. log4j2-547-builders.patch
          18 kB
          Bruce Brouwer
        4. log4j2-547-new-module.patch
          117 kB
          Bruce Brouwer
        5. log4j2-547-remove-streams.patch
          24 kB
          Bruce Brouwer
        6. log4j2-loggerStream.patch
          14 kB
          Bruce Brouwer
        7. MyBenchmark.java
          3 kB
          Bruce Brouwer
        8. PerfTestCalcLocation.java
          2 kB
          Bruce Brouwer

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mattsicker Matt Sicker
            mattsicker Matt Sicker
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment