Uploaded image for project: 'Commons Logging'
  1. Commons Logging
  2. LOGGING-47

[logging][PATCH] Improvements to wrapper classes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1.0
    • None
    • Operating System: All
      Platform: All

    • 38174

    Description

      There are several issues with the wrapper classes.

      1) Logging null objects or not
      If the message object is null, the logger logs the String "NULL" to the
      underlying log system. Currently some wrappers just return and some log the
      String "NULL".
      -> The patch unifies that. All wrappers will log the String "NULL".

      2) Exception safe toString
      Currently all wrappers would fail if an toString method throws a
      RuntimeException. See
      http://marc.theaimsgroup.com/?l=jakarta-commons-dev&m=113664590418487&w=2
      for details.
      -> The patch logs an error message instead and an additional log record with
      the exception in a central, private doLog method.

      3) isLoggable check
      Currently some wrappers check the log level in each log method and some wrappers
      check the level in one central method, which applies the log message and
      throwable to the underlying log system.
      -> The patch unifies that. All wrappers will use a doLog method and check the
      level there. One exception: AvalonLogger which has no Level/Priority object.

      3) JavaDoc
      Every wrapper has its own javadoc for the log methods, sometime with reference
      to the Log interface, sometimes with the underlying log level, ...
      -> The patch unifies that. All wrapper log methods are commented in the same way.

      4) Additional class
      There is one additional class for the error message, to have a single point of
      change.

      Please check the patch for correct format.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--SimpleLog_Patch.txt
          11 kB
          Boris Unckel
        2. ASF.LICENSE.NOT.GRANTED--LogKitLogger_Patch.txt
          14 kB
          Boris Unckel
        3. ASF.LICENSE.NOT.GRANTED--Log4J13Logger_Patch.txt
          9 kB
          Boris Unckel
        4. ASF.LICENSE.NOT.GRANTED--Log4J12Logger_Patch.txt
          11 kB
          Boris Unckel
        5. ASF.LICENSE.NOT.GRANTED--Jdk14Logger_Patch.txt
          9 kB
          Boris Unckel
        6. ASF.LICENSE.NOT.GRANTED--Jdk13LumberjackLogger_Patch.txt
          12 kB
          Boris Unckel
        7. ASF.LICENSE.NOT.GRANTED--AvalonLogger_Patch.txt
          19 kB
          Boris Unckel
        8. ASF.LICENSE.NOT.GRANTED--jclimpl.patch
          82 kB
          Boris Unckel
        9. ASF.LICENSE.NOT.GRANTED--jclimpl.patch
          82 kB
          Boris Unckel

        Activity

          People

            Unassigned Unassigned
            boris.unckel.mlg@gmx.net Boris Unckel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: