Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.4
    • Fix Version/s: 1.1.0
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      Statistics show, that logging code take normally nearly 4% of the
      application's code. To increase coverage and exclude side-effects from the
      logging code it is useful to have unit tests running the compete logging code,
      too. The MemoryLog class is especially designed for this purpose, since every
      log entry can be retrieved later on as big list with each entry represented by
      a bean. This makes it e.g. easy to test for thrown and logged exceptions.

      Code for MemoryLog and MemoryLogTest attached, code borrows from SimpleLog.

      1. ASF.LICENSE.NOT.GRANTED--MemoryLog.java
        11 kB
        joerg.schaible@gmx.de
      2. ASF.LICENSE.NOT.GRANTED--MemoryLogTest.java
        3 kB
        joerg.schaible@gmx.de

        Activity

        Hide
        rdonkin@apache.org added a comment -

        Committed. Many thanks.

        This has been added to the new optional jar containing non-core jars.

        Show
        rdonkin@apache.org added a comment - Committed. Many thanks. This has been added to the new optional jar containing non-core jars.
        Hide
        joerg.schaible@gmx.de added a comment -

        Created an attachment (id=10786)
        src/test/org/apache/commons/logging/MemoryLog.java

        Show
        joerg.schaible@gmx.de added a comment - Created an attachment (id=10786) src/test/org/apache/commons/logging/MemoryLog.java
        Hide
        joerg.schaible@gmx.de added a comment -

        Created an attachment (id=10785)
        src/java/org/apache/commons/logging/impl/MemoryLog.java

        Show
        joerg.schaible@gmx.de added a comment - Created an attachment (id=10785) src/java/org/apache/commons/logging/impl/MemoryLog.java

          People

          • Assignee:
            Unassigned
            Reporter:
            Joerg Schaible
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development