Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.0.3
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: All

      Description

      it would be very useful to have a SimpleLog class that writes into a file (no
      pipes). Or at least to refactor SimpleLog to extract a BaseLog class with some
      basic functionalities (like generating the message).

        Activity

        Hide
        Craig McClanahan added a comment -

        I'm also -1. commons-logging is not and should not be in the business of
        providing robust logging implementations – it is designed to be a wrapper
        around existing logging technologies. Had I to do it over again, I probably
        would have argued against including even SimpleLog in the basic package.

        Besides, all you have to do is redirect where System.err writes to and you've
        accomplished what this bug report wants. You can look at what recent versions
        of Tomcat do in this regard.

        Show
        Craig McClanahan added a comment - I'm also -1. commons-logging is not and should not be in the business of providing robust logging implementations – it is designed to be a wrapper around existing logging technologies. Had I to do it over again, I probably would have argued against including even SimpleLog in the basic package. Besides, all you have to do is redirect where System.err writes to and you've accomplished what this bug report wants. You can look at what recent versions of Tomcat do in this regard.
        Hide
        Yoav Shapira added a comment -

        -1 On this addition. Commons-logging should really stay away from
        implementations are much as possible – log4j, avalon, jdk1.4 all have this
        feature.

        Show
        Yoav Shapira added a comment - -1 On this addition. Commons-logging should really stay away from implementations are much as possible – log4j, avalon, jdk1.4 all have this feature.
        Hide
        rdonkin@apache.org added a comment -

        commons-logging 1.0.3 released

        Show
        rdonkin@apache.org added a comment - commons-logging 1.0.3 released
        Hide
        Vladimir R. Bossicard added a comment -

        Fine. I'll wait for 1.04

        Show
        Vladimir R. Bossicard added a comment - Fine. I'll wait for 1.04
        Hide
        rdonkin@apache.org added a comment -

        it was just too late in the process to be included. the release VOTE had already
        been been completed on the basis of CVS HEAD. the code to be released is now
        tagged and so the release will be shipped without this patch.

        if the community considers the patch important enough to warrant it, a swift
        1.0.4 release could be made including this patch.

        • robert
        Show
        rdonkin@apache.org added a comment - it was just too late in the process to be included. the release VOTE had already been been completed on the basis of CVS HEAD. the code to be released is now tagged and so the release will be shipped without this patch. if the community considers the patch important enough to warrant it, a swift 1.0.4 release could be made including this patch. robert
        Hide
        Vladimir R. Bossicard added a comment -

        What can I do to have this included into 1.0.3?

        Show
        Vladimir R. Bossicard added a comment - What can I do to have this included into 1.0.3?
        Hide
        rdonkin@apache.org added a comment -

        This will have to be left until after the 1.0.3 release

        Show
        rdonkin@apache.org added a comment - This will have to be left until after the 1.0.3 release
        Hide
        Arun Mammen Thomas added a comment -

        Think this was moved to Validator by accident as it has nothing to do with
        validation....

        Show
        Arun Mammen Thomas added a comment - Think this was moved to Validator by accident as it has nothing to do with validation....
        Hide
        Vladimir R. Bossicard added a comment -

        I've written this FileLog class for my JUnit-addons package. And you were
        right, it was a little bit behond the scope of Commons-Logging.

        While writing my class, I refactored the SimpleLog class and split the
        functionality into two classes: AbstractLog and SimpleLog. You can have a look
        at :

        <http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/junit-addons/sandbox/incubator/main/junitx/tool/logging/>

        Sorry for not sending a patch. Feel free to include this code into the
        Commons-logging package.

        Show
        Vladimir R. Bossicard added a comment - I've written this FileLog class for my JUnit-addons package. And you were right, it was a little bit behond the scope of Commons-Logging. While writing my class, I refactored the SimpleLog class and split the functionality into two classes: AbstractLog and SimpleLog. You can have a look at : < http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/junit-addons/sandbox/incubator/main/junitx/tool/logging/ > Sorry for not sending a patch. Feel free to include this code into the Commons-logging package.
        Hide
        Gary Ashley added a comment -

        The SimpleLog class writes to System.err which can point to a file. Use the
        System.setErr(PrintStream) method to modify this behavior.
        See the javadoc:
        http://java.sun.com/j2se/1.3/docs/api/java/lang/System.html#err
        a good tutorial: http://www.javacoffeebreak.com/java103/java103.html#output

        Also, the Log4J Logger has both a FileAppender and RollingFileAppender.

        IMHO, This seems beyond the scope of the Commons Logging API. I would look to
        Avalon, JDK1.4, or Log4J to supply this functionality.

        Show
        Gary Ashley added a comment - The SimpleLog class writes to System.err which can point to a file. Use the System.setErr(PrintStream) method to modify this behavior. See the javadoc: http://java.sun.com/j2se/1.3/docs/api/java/lang/System.html#err a good tutorial: http://www.javacoffeebreak.com/java103/java103.html#output Also, the Log4J Logger has both a FileAppender and RollingFileAppender. IMHO, This seems beyond the scope of the Commons Logging API. I would look to Avalon, JDK1.4, or Log4J to supply this functionality.

          People

          • Assignee:
            Unassigned
            Reporter:
            Vladimir R. Bossicard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development