logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grobme...@apache.org
Subject svn commit: r1345524 [8/17] - in /logging/log4j/branches/log4j12-bz53299: ./ contribs/ contribs/CekiGulcu/ contribs/EirikLygre/ contribs/JamesHouse/ contribs/Jamie Tsao/ contribs/JimMoore/ contribs/KevinSteppe/ contribs/KitchingSimon/ contribs/LeosLite...
Date Sat, 02 Jun 2012 15:36:26 GMT
Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/pattern/enhancedPatternLayout.9 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/pattern/enhancedPatternLayout.9)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/pattern/enhancedPatternLayout.9?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/pattern/enhancedPatternLayout.9&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/pattern/enhancedPatternLayout.9&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
Binary files - no diff available.

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/pattern/enhancedPatternLayout.mdc.1 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/pattern/enhancedPatternLayout.mdc.1)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/pattern/enhancedPatternLayout.mdc.1?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/pattern/enhancedPatternLayout.mdc.1&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/pattern/enhancedPatternLayout.mdc.1&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
Binary files - no diff available.

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/pattern/enhancedPatternLayout.mdc.2 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/pattern/enhancedPatternLayout.mdc.2)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/pattern/enhancedPatternLayout.mdc.2?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/pattern/enhancedPatternLayout.mdc.2&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/pattern/enhancedPatternLayout.mdc.2&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
Binary files - no diff available.

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/pattern/enhancedPatternLayout.throwable (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/pattern/enhancedPatternLayout.throwable)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/pattern/enhancedPatternLayout.throwable?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/pattern/enhancedPatternLayout.throwable&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/pattern/enhancedPatternLayout.throwable&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.1 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.1)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.1?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.1&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.1&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.10 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.10)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.10?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.10&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.10&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.11 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.11)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.11?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.11&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.11&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.12 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.12)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.12?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.12&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.12&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.13 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.13)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.13?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.13&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.13&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.14 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.14)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.14?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.14&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.14&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.2 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.2)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.2?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.2&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.2&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.3 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.3)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.3?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.3&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.3&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.4 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.4)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.4?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.4&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.4&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.5 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.5)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.5?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.5&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.5&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.6 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.6)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.6?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.6&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.6&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.7 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.7)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.7?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.7&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.7&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.8 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.8)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.8?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.8&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.8&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.9 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.9)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.9?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.9&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.9&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.mdc.1 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.mdc.1)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.mdc.1?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.mdc.1&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.mdc.1&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
Binary files - no diff available.

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.mdc.clear (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.mdc.clear)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.mdc.clear?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/patternLayout.mdc.clear&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/patternLayout.mdc.clear&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/prudent (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/prudent)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/prudent?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/prudent&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/prudent&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/exception.bin (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/serialization/exception.bin)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/exception.bin?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/exception.bin&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/serialization/exception.bin&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
Binary files - no diff available.

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/info.bin (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/serialization/info.bin)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/info.bin?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/info.bin&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/serialization/info.bin&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
Binary files - no diff available.

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/location.bin (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/serialization/location.bin)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/location.bin?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/location.bin&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/serialization/location.bin&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
Binary files - no diff available.

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/mdc.bin (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/serialization/mdc.bin)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/mdc.bin?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/mdc.bin&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/serialization/mdc.bin&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
Binary files - no diff available.

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/ndc.bin (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/serialization/ndc.bin)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/ndc.bin?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/ndc.bin&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/serialization/ndc.bin&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
Binary files - no diff available.

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/simple.bin (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/serialization/simple.bin)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/simple.bin?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/serialization/simple.bin&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/serialization/simple.bin&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
Binary files - no diff available.

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/simple (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/simple)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/simple?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/simple&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/simple&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.1 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.1)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.1?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.1&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.1&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.2 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.2)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.2?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.2&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.2&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.3 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.3)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.3?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.3&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.3&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.4 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.4)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.4?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.4&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.4&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.5 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.5)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.5?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.5&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.5&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.6 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.6)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.6?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.6&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.6&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.7 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.7)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.7?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.7&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.7&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.8 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.8)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.8?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/socketServer.8&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/socketServer.8&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/ttcc (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/ttcc)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/ttcc?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/ttcc&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/ttcc&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.1 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/xmlLayout.1)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.1?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.1&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/xmlLayout.1&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.2 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/xmlLayout.2)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.2?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.2&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/xmlLayout.2&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.3 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/xmlLayout.3)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.3?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.3&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/xmlLayout.3&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.mdc.1 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/xmlLayout.mdc.1)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.mdc.1?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.mdc.1&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/xmlLayout.mdc.1&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
Binary files - no diff available.

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.mdc.2 (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/xmlLayout.mdc.2)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.mdc.2?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.mdc.2&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/xmlLayout.mdc.2&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
Binary files - no diff available.

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.null (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/witness/xmlLayout.null)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.null?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/resources/witness/xmlLayout.null&p1=logging/log4j/branches/log4j12-bz53299/tests/witness/xmlLayout.null&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/run-tests.bat (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/run-tests.bat)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/run-tests.bat?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/run-tests.bat&p1=logging/log4j/branches/log4j12-bz53299/tests/run-tests.bat&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Propchange: logging/log4j/branches/log4j12-bz53299/core/src/test/run-tests.bat
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: logging/log4j/branches/log4j12-bz53299/core/src/test/run-tests.bat
------------------------------------------------------------------------------
    svn:executable = *

Propchange: logging/log4j/branches/log4j12-bz53299/core/src/test/run-tests.bat
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Copied: logging/log4j/branches/log4j12-bz53299/core/src/test/sun_checks.xml (from r1345516, logging/log4j/branches/log4j12-bz53299/tests/sun_checks.xml)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/core/src/test/sun_checks.xml?p2=logging/log4j/branches/log4j12-bz53299/core/src/test/sun_checks.xml&p1=logging/log4j/branches/log4j12-bz53299/tests/sun_checks.xml&r1=1345516&r2=1345524&rev=1345524&view=diff
==============================================================================
    (empty)

Propchange: logging/log4j/branches/log4j12-bz53299/core/src/test/sun_checks.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/modules/chainsaw/pom.xml?rev=1345524&view=auto
==============================================================================
--- logging/log4j/branches/log4j12-bz53299/modules/chainsaw/pom.xml (added)
+++ logging/log4j/branches/log4j12-bz53299/modules/chainsaw/pom.xml Sat Jun  2 15:35:46 2012
@@ -0,0 +1,38 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+      <groupId>org.apache.log4j</groupId>
+      <artifactId>log4j-modules</artifactId>
+      <version>1.4.0-SNAPSHOT</version>
+  </parent>
+  <groupId>org.apache.log4j</groupId>
+  <artifactId>log4j-chainsaw</artifactId>
+  <name>Apache Log4j-Chainsaw V1</name>
+  <packaging>jar</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+
+</project>
\ No newline at end of file

Propchange: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java?rev=1345524&view=auto
==============================================================================
--- logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java (added)
+++ logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java Sat Jun  2 15:35:46 2012
@@ -0,0 +1,222 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.log4j.chainsaw;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.apache.log4j.Level;
+
+/**
+ * Represents the controls for filtering, pausing, exiting, etc.
+ *
+ * @author <a href="mailto:oliver@puppycrawl.com">Oliver Burn</a>
+ */
+class ControlPanel extends JPanel {
+    /** use the log messages **/
+    private static final Logger LOG = 
+                                  Logger.getLogger(ControlPanel.class);
+
+    /**
+     * Creates a new <code>ControlPanel</code> instance.
+     *
+     * @param aModel the model to control
+     */
+    ControlPanel(final MyTableModel aModel) {
+        setBorder(BorderFactory.createTitledBorder("Controls: "));
+        final GridBagLayout gridbag = new GridBagLayout();
+        final GridBagConstraints c = new GridBagConstraints();
+        setLayout(gridbag);
+
+        // Pad everything
+        c.ipadx = 5;
+        c.ipady = 5;
+
+        // Add the 1st column of labels
+        c.gridx = 0;
+        c.anchor = GridBagConstraints.EAST;
+
+        c.gridy = 0;
+        JLabel label = new JLabel("Filter Level:");
+        gridbag.setConstraints(label, c);
+        add(label);
+
+        c.gridy++;
+        label = new JLabel("Filter Thread:");
+        gridbag.setConstraints(label, c);
+        add(label);
+
+        c.gridy++;
+        label = new JLabel("Filter Logger:");
+        gridbag.setConstraints(label, c);
+        add(label);
+
+        c.gridy++;
+        label = new JLabel("Filter NDC:");
+        gridbag.setConstraints(label, c);
+        add(label);
+
+        c.gridy++;
+        label = new JLabel("Filter Message:");
+        gridbag.setConstraints(label, c);
+        add(label);
+
+        // Add the 2nd column of filters
+        c.weightx = 1;
+        //c.weighty = 1;
+        c.gridx = 1;
+        c.anchor = GridBagConstraints.WEST;
+
+        c.gridy = 0;
+        final Level[] allPriorities = new Level[] {Level.FATAL, 
+               Level.ERROR, 
+               Level.WARN, 
+			   Level.INFO, 
+			   Level.DEBUG, 
+			   Level.TRACE };
+        
+        final JComboBox priorities = new JComboBox(allPriorities);
+        final Level lowest = allPriorities[allPriorities.length - 1];
+        priorities.setSelectedItem(lowest);
+        aModel.setPriorityFilter(lowest);
+        gridbag.setConstraints(priorities, c);
+        add(priorities);
+        priorities.setEditable(false);
+        priorities.addActionListener(new ActionListener() {
+                public void actionPerformed(ActionEvent aEvent) {
+                    aModel.setPriorityFilter(
+                        (Priority) priorities.getSelectedItem());
+                }
+            });
+
+
+        c.fill = GridBagConstraints.HORIZONTAL;
+        c.gridy++;
+        final JTextField threadField = new JTextField("");
+        threadField.getDocument().addDocumentListener(new DocumentListener () {
+                public void insertUpdate(DocumentEvent aEvent) {
+                    aModel.setThreadFilter(threadField.getText());
+                }
+                public void removeUpdate(DocumentEvent aEvente) {
+                    aModel.setThreadFilter(threadField.getText());
+                }
+                public void changedUpdate(DocumentEvent aEvent) {
+                    aModel.setThreadFilter(threadField.getText());
+                }
+            });
+        gridbag.setConstraints(threadField, c);
+        add(threadField);
+
+        c.gridy++;
+        final JTextField catField = new JTextField("");
+        catField.getDocument().addDocumentListener(new DocumentListener () {
+                public void insertUpdate(DocumentEvent aEvent) {
+                    aModel.setCategoryFilter(catField.getText());
+                }
+                public void removeUpdate(DocumentEvent aEvent) {
+                    aModel.setCategoryFilter(catField.getText());
+                }
+                public void changedUpdate(DocumentEvent aEvent) {
+                    aModel.setCategoryFilter(catField.getText());
+                }
+            });
+        gridbag.setConstraints(catField, c);
+        add(catField);
+
+        c.gridy++;
+        final JTextField ndcField = new JTextField("");
+        ndcField.getDocument().addDocumentListener(new DocumentListener () {
+                public void insertUpdate(DocumentEvent aEvent) {
+                    aModel.setNDCFilter(ndcField.getText());
+                }
+                public void removeUpdate(DocumentEvent aEvent) {
+                    aModel.setNDCFilter(ndcField.getText());
+                }
+                public void changedUpdate(DocumentEvent aEvent) {
+                    aModel.setNDCFilter(ndcField.getText());
+                }
+            });
+        gridbag.setConstraints(ndcField, c);
+        add(ndcField);
+
+        c.gridy++;
+        final JTextField msgField = new JTextField("");
+        msgField.getDocument().addDocumentListener(new DocumentListener () {
+                public void insertUpdate(DocumentEvent aEvent) {
+                    aModel.setMessageFilter(msgField.getText());
+                }
+                public void removeUpdate(DocumentEvent aEvent) {
+                    aModel.setMessageFilter(msgField.getText());
+                }
+                public void changedUpdate(DocumentEvent aEvent) {
+                    aModel.setMessageFilter(msgField.getText());
+                }
+            });
+
+
+        gridbag.setConstraints(msgField, c);
+        add(msgField);
+
+        // Add the 3rd column of buttons
+        c.weightx = 0;
+        c.fill = GridBagConstraints.HORIZONTAL;
+        c.anchor = GridBagConstraints.EAST;
+        c.gridx = 2;
+
+        c.gridy = 0;
+        final JButton exitButton = new JButton("Exit");
+        exitButton.setMnemonic('x');
+        exitButton.addActionListener(ExitAction.INSTANCE);
+        gridbag.setConstraints(exitButton, c);
+        add(exitButton);
+
+        c.gridy++;
+        final JButton clearButton = new JButton("Clear");
+        clearButton.setMnemonic('c');
+        clearButton.addActionListener(new ActionListener() {
+                public void actionPerformed(ActionEvent aEvent) {
+                    aModel.clear();
+                }
+            });
+        gridbag.setConstraints(clearButton, c);
+        add(clearButton);
+
+        c.gridy++;
+        final JButton toggleButton = new JButton("Pause");
+        toggleButton.setMnemonic('p');
+        toggleButton.addActionListener(new ActionListener() {
+                public void actionPerformed(ActionEvent aEvent) {
+                    aModel.toggle();
+                    toggleButton.setText(
+                        aModel.isPaused() ? "Resume" : "Pause");
+                }
+            });
+        gridbag.setConstraints(toggleButton, c);
+        add(toggleButton);
+    }
+}

Propchange: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java?rev=1345524&view=auto
==============================================================================
--- logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java (added)
+++ logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java Sat Jun  2 15:35:46 2012
@@ -0,0 +1,170 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.log4j.chainsaw;
+
+import java.awt.BorderLayout;
+import java.text.MessageFormat;
+import java.util.Date;
+import javax.swing.BorderFactory;
+import javax.swing.JEditorPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import org.apache.log4j.Logger;
+
+/**
+ * A panel for showing a stack trace.
+ *
+ * @author <a href="mailto:oliver@puppycrawl.com">Oliver Burn</a>
+ */
+class DetailPanel
+    extends JPanel
+    implements ListSelectionListener
+{
+    /** used to log events **/
+    private static final Logger LOG =
+        Logger.getLogger(DetailPanel.class);
+
+    /** used to format the logging event **/
+    private static final MessageFormat FORMATTER = new MessageFormat(
+        "<b>Time:</b> <code>{0,time,medium}</code>" +
+        "&nbsp;&nbsp;<b>Priority:</b> <code>{1}</code>" +
+        "&nbsp;&nbsp;<b>Thread:</b> <code>{2}</code>" +
+        "&nbsp;&nbsp;<b>NDC:</b> <code>{3}</code>" +
+        "<br><b>Logger:</b> <code>{4}</code>" +
+        "<br><b>Location:</b> <code>{5}</code>" +
+        "<br><b>Message:</b>" +
+        "<pre>{6}</pre>" +
+        "<b>Throwable:</b>" +
+        "<pre>{7}</pre>");
+
+    /** the model for the data to render **/
+    private final MyTableModel mModel;
+    /** pane for rendering detail **/
+    private final JEditorPane mDetails;
+
+    /**
+     * Creates a new <code>DetailPanel</code> instance.
+     *
+     * @param aTable the table to listen for selections on
+     * @param aModel the model backing the table
+     */
+    DetailPanel(JTable aTable, final MyTableModel aModel) {
+        mModel = aModel;
+        setLayout(new BorderLayout());
+        setBorder(BorderFactory.createTitledBorder("Details: "));
+
+        mDetails = new JEditorPane();
+        mDetails.setEditable(false);
+        mDetails.setContentType("text/html");
+        add(new JScrollPane(mDetails), BorderLayout.CENTER);
+
+        final ListSelectionModel rowSM = aTable.getSelectionModel();
+        rowSM.addListSelectionListener(this);
+    }
+
+    /** @see ListSelectionListener **/
+    public void valueChanged(ListSelectionEvent aEvent) {
+        //Ignore extra messages.
+        if (aEvent.getValueIsAdjusting()) {
+            return;
+        }
+
+        final ListSelectionModel lsm = (ListSelectionModel) aEvent.getSource();
+        if (lsm.isSelectionEmpty()) {
+            mDetails.setText("Nothing selected");
+        } else {
+            final int selectedRow = lsm.getMinSelectionIndex();
+            final EventDetails e = mModel.getEventDetails(selectedRow);
+            final Object[] args =
+            {
+                new Date(e.getTimeStamp()),
+                e.getPriority(),
+                escape(e.getThreadName()),
+                escape(e.getNDC()),
+                escape(e.getCategoryName()),
+                escape(e.getLocationDetails()),
+                escape(e.getMessage()),
+                escape(getThrowableStrRep(e))
+            };
+            mDetails.setText(FORMATTER.format(args));
+            mDetails.setCaretPosition(0);
+        }
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Private methods
+    ////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * Returns a string representation of a throwable.
+     *
+     * @param aEvent contains the throwable information
+     * @return a <code>String</code> value
+     */
+    private static String getThrowableStrRep(EventDetails aEvent) {
+        final String[] strs = aEvent.getThrowableStrRep();
+        if (strs == null) {
+            return null;
+        }
+
+        final StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < strs.length; i++) {
+            sb.append(strs[i]).append("\n");
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     * Escape &lt;, &gt; &amp; and &quot; as their entities. It is very
+     * dumb about &amp; handling.
+     * @param aStr the String to escape.
+     * @return the escaped String
+     */
+    private String escape(String aStr) {
+        if (aStr == null) {
+            return null;
+        }
+
+        final StringBuffer buf = new StringBuffer();
+        for (int i = 0; i < aStr.length(); i++) {
+            char c = aStr.charAt(i);
+            switch (c) {
+            case '<':
+                buf.append("&lt;");
+                break;
+            case '>':
+                buf.append("&gt;");
+                break;
+            case '\"':
+                buf.append("&quot;");
+                break;
+            case '&':
+                buf.append("&amp;");
+                break;
+            default:
+                buf.append(c);
+                break;
+            }
+        }
+        return buf.toString();
+    }
+}

Propchange: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java?rev=1345524&view=auto
==============================================================================
--- logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java (added)
+++ logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java Sat Jun  2 15:35:46 2012
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.log4j.chainsaw;
+
+import org.apache.log4j.Priority;
+import org.apache.log4j.spi.LoggingEvent;
+
+/**
+ * Represents the details of a logging event. It is intended to overcome the
+ * problem that a LoggingEvent cannot be constructed with purely fake data.
+ *
+ * @author <a href="mailto:oliver@puppycrawl.com">Oliver Burn</a>
+ * @version 1.0
+ */
+class EventDetails {
+
+    /** the time of the event **/
+    private final long mTimeStamp;
+    /** the priority of the event **/
+    private final Priority mPriority;
+    /** the category of the event **/
+    private final String mCategoryName;
+    /** the NDC for the event **/
+    private final String mNDC;
+    /** the thread for the event **/
+    private final String mThreadName;
+    /** the msg for the event **/
+    private final String mMessage;
+    /** the throwable details the event **/
+    private final String[] mThrowableStrRep;
+    /** the location details for the event **/
+    private final String mLocationDetails;
+
+    /**
+     * Creates a new <code>EventDetails</code> instance.
+     * @param aTimeStamp a <code>long</code> value
+     * @param aPriority a <code>Priority</code> value
+     * @param aCategoryName a <code>String</code> value
+     * @param aNDC a <code>String</code> value
+     * @param aThreadName a <code>String</code> value
+     * @param aMessage a <code>String</code> value
+     * @param aThrowableStrRep a <code>String[]</code> value
+     * @param aLocationDetails a <code>String</code> value
+     */
+    EventDetails(long aTimeStamp,
+                 Priority aPriority,
+                 String aCategoryName,
+                 String aNDC,
+                 String aThreadName,
+                 String aMessage,
+                 String[] aThrowableStrRep,
+                 String aLocationDetails)
+    {
+        mTimeStamp = aTimeStamp;
+        mPriority = aPriority;
+        mCategoryName = aCategoryName;
+        mNDC = aNDC;
+        mThreadName = aThreadName;
+        mMessage = aMessage;
+        mThrowableStrRep = aThrowableStrRep;
+        mLocationDetails = aLocationDetails;
+    }
+
+    /**
+     * Creates a new <code>EventDetails</code> instance.
+     *
+     * @param aEvent a <code>LoggingEvent</code> value
+     */
+    EventDetails(LoggingEvent aEvent) {
+
+        this(aEvent.timeStamp,
+             aEvent.getLevel(),
+             aEvent.getLoggerName(),
+             aEvent.getNDC(),
+             aEvent.getThreadName(),
+             aEvent.getRenderedMessage(),
+             aEvent.getThrowableStrRep(),
+             (aEvent.getLocationInformation() == null)
+             ? null : aEvent.getLocationInformation().fullInfo);
+    }
+
+    /** @see #mTimeStamp **/
+    long getTimeStamp() {
+        return mTimeStamp;
+    }
+
+    /** @see #mPriority **/
+    Priority getPriority() {
+        return mPriority;
+    }
+
+    /** @see #mCategoryName **/
+    String getCategoryName() {
+        return mCategoryName;
+    }
+
+    /** @see #mNDC **/
+    String getNDC() {
+        return mNDC;
+    }
+
+    /** @see #mThreadName **/
+    String getThreadName() {
+        return mThreadName;
+    }
+
+    /** @see #mMessage **/
+    String getMessage() {
+        return mMessage;
+    }
+
+    /** @see #mLocationDetails **/
+    String getLocationDetails(){
+        return mLocationDetails;
+    }
+
+    /** @see #mThrowableStrRep **/
+    String[] getThrowableStrRep() {
+        return mThrowableStrRep;
+    }
+}

Propchange: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java?rev=1345524&view=auto
==============================================================================
--- logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java (added)
+++ logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java Sat Jun  2 15:35:46 2012
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.log4j.chainsaw;
+
+import java.awt.event.ActionEvent;
+import javax.swing.AbstractAction;
+import org.apache.log4j.Logger;
+
+/**
+ * Encapsulates the action to exit.
+ *
+ * @author <a href="mailto:oliver@puppycrawl.com">Oliver Burn</a>
+ * @version 1.0
+ */
+class ExitAction
+    extends AbstractAction
+{
+    /** use to log messages **/
+    private static final Logger LOG = Logger.getLogger(ExitAction.class);
+    /** The instance to share **/
+    public static final ExitAction INSTANCE = new ExitAction();
+
+    /** Stop people creating instances **/
+    private ExitAction() {}
+
+    /**
+     * Will shutdown the application.
+     * @param aIgnore ignored
+     */
+    public void actionPerformed(ActionEvent aIgnore) {
+        LOG.info("shutting down");
+        System.exit(0);
+    }
+}

Propchange: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java?rev=1345524&view=auto
==============================================================================
--- logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java (added)
+++ logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java Sat Jun  2 15:35:46 2012
@@ -0,0 +1,139 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.log4j.chainsaw;
+
+import java.awt.event.ActionEvent;
+import java.io.File;
+import java.io.IOException;
+import java.io.StringReader;
+import javax.swing.AbstractAction;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.JOptionPane;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+import org.apache.log4j.Logger;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/**
+ * Encapsulates the action to load an XML file.
+ *
+ * @author <a href="mailto:oliver@puppycrawl.com">Oliver Burn</a>
+ * @version 1.0
+ */
+class LoadXMLAction
+    extends AbstractAction
+{
+    /** use to log messages **/
+    private static final Logger LOG = Logger.getLogger(LoadXMLAction.class);
+
+    /** the parent frame **/
+    private final JFrame mParent;
+
+    /**
+     * the file chooser - configured to allow only the selection of a
+     * single file.
+     */
+    private final JFileChooser mChooser = new JFileChooser();
+    {
+        mChooser.setMultiSelectionEnabled(false);
+        mChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
+    }
+
+    /** parser to read XML files **/
+    private final XMLReader mParser;
+    /** the content handler **/
+    private final XMLFileHandler mHandler;
+
+
+    /**
+     * Creates a new <code>LoadXMLAction</code> instance.
+     *
+     * @param aParent the parent frame
+     * @param aModel the model to add events to
+     * @exception SAXException if an error occurs
+     * @throws ParserConfigurationException if an error occurs
+     */
+    LoadXMLAction(JFrame aParent, MyTableModel aModel)
+        throws SAXException, ParserConfigurationException
+    {
+        mParent = aParent;
+        mHandler = new XMLFileHandler(aModel);
+        mParser = SAXParserFactory.newInstance().newSAXParser().getXMLReader();
+        mParser.setContentHandler(mHandler);
+    }
+
+    /**
+     * Prompts the user for a file to load events from.
+     * @param aIgnore an <code>ActionEvent</code> value
+     */
+    public void actionPerformed(ActionEvent aIgnore) {
+        LOG.info("load file called");
+        if (mChooser.showOpenDialog(mParent) == JFileChooser.APPROVE_OPTION) {
+            LOG.info("Need to load a file");
+            final File chosen = mChooser.getSelectedFile();
+            LOG.info("loading the contents of " + chosen.getAbsolutePath());
+            try {
+                final int num = loadFile(chosen.getAbsolutePath());
+                JOptionPane.showMessageDialog(
+                    mParent,
+                    "Loaded " + num + " events.",
+                    "CHAINSAW",
+                    JOptionPane.INFORMATION_MESSAGE);
+            } catch (Exception e) {
+                LOG.warn("caught an exception loading the file", e);
+                JOptionPane.showMessageDialog(
+                    mParent,
+                    "Error parsing file - " + e.getMessage(),
+                    "CHAINSAW",
+                    JOptionPane.ERROR_MESSAGE);
+            }
+        }
+    }
+
+    /**
+     * Loads the contents of file into the model
+     *
+     * @param aFile the file to extract events from
+     * @return the number of events loaded
+     * @throws SAXException if an error occurs
+     * @throws IOException if an error occurs
+     */
+    private int loadFile(String aFile)
+        throws SAXException, IOException
+    {
+        synchronized (mParser) {
+            // Create a dummy document to parse the file
+            final StringBuffer buf = new StringBuffer();
+            buf.append("<?xml version=\"1.0\" standalone=\"yes\"?>\n");
+            buf.append("<!DOCTYPE log4j:eventSet ");
+            buf.append("[<!ENTITY data SYSTEM \"file:///");
+            buf.append(aFile);
+            buf.append("\">]>\n");
+            buf.append("<log4j:eventSet xmlns:log4j=\"Claira\">\n");
+            buf.append("&data;\n");
+            buf.append("</log4j:eventSet>\n");
+
+            final InputSource is =
+                new InputSource(new StringReader(buf.toString()));
+            mParser.parse(is);
+            return mHandler.getNumEvents();
+        }
+    }
+}

Propchange: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoggingReceiver.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoggingReceiver.java?rev=1345524&view=auto
==============================================================================
--- logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoggingReceiver.java (added)
+++ logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoggingReceiver.java Sat Jun  2 15:35:46 2012
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.log4j.chainsaw;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.SocketException;
+import org.apache.log4j.Logger;
+import org.apache.log4j.spi.LoggingEvent;
+
+/**
+ * A daemon thread the processes connections from a
+ * <code>org.apache.log4j.net.SocketAppender.html</code>.
+ *
+ * @author <a href="mailto:oliver@puppycrawl.com">Oliver Burn</a>
+ */
+class LoggingReceiver extends Thread {
+    /** used to log messages **/
+    private static final Logger LOG = Logger.getLogger(LoggingReceiver.class);
+
+    /**
+     * Helper that actually processes a client connection. It receives events
+     * and adds them to the supplied model.
+     *
+     * @author <a href="mailto:oliver@puppycrawl.com">Oliver Burn</a>
+     */
+    private class Slurper implements Runnable {
+        /** socket connection to read events from **/
+        private final Socket mClient;
+
+        /**
+         * Creates a new <code>Slurper</code> instance.
+         *
+         * @param aClient socket to receive events from
+         */
+        Slurper(Socket aClient) {
+            mClient = aClient;
+        }
+
+        /** loops getting the events **/
+        public void run() {
+            LOG.debug("Starting to get data");
+            try {
+                final ObjectInputStream ois =
+                    new ObjectInputStream(mClient.getInputStream());
+                while (true) {
+                    final LoggingEvent event = (LoggingEvent) ois.readObject();
+                    mModel.addEvent(new EventDetails(event));
+                }
+            } catch (EOFException e) {
+                LOG.info("Reached EOF, closing connection");
+            } catch (SocketException e) {
+                LOG.info("Caught SocketException, closing connection");
+            } catch (IOException e) {
+                LOG.warn("Got IOException, closing connection", e);
+            } catch (ClassNotFoundException e) {
+                LOG.warn("Got ClassNotFoundException, closing connection", e);
+            }
+
+            try {
+                mClient.close();
+            } catch (IOException e) {
+                LOG.warn("Error closing connection", e);
+            }
+        }
+    }
+
+    /** where to put the events **/
+    private MyTableModel mModel;
+
+    /** server for listening for connections **/
+    private ServerSocket mSvrSock;
+    
+    /**
+     * Creates a new <code>LoggingReceiver</code> instance.
+     *
+     * @param aModel model to place put received into
+     * @param aPort port to listen on
+     * @throws IOException if an error occurs
+     */
+    LoggingReceiver(MyTableModel aModel, int aPort) throws IOException {
+        setDaemon(true);
+        mModel = aModel;
+        mSvrSock = new ServerSocket(aPort);
+    }
+
+    /** Listens for client connections **/
+    public void run() {
+        LOG.info("Thread started");
+        try {
+            while (true) {
+                LOG.debug("Waiting for a connection");
+                final Socket client = mSvrSock.accept();
+                LOG.debug("Got a connection from " +
+                          client.getInetAddress().getHostName());
+                final Thread t = new Thread(new Slurper(client));
+                t.setDaemon(true);
+                t.start();
+            }
+        } catch (IOException e) {
+            LOG.error("Error in accepting connections, stopping.", e);
+        }
+    }
+}

Propchange: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoggingReceiver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/Main.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/Main.java?rev=1345524&view=auto
==============================================================================
--- logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/Main.java (added)
+++ logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/Main.java Sat Jun  2 15:35:46 2012
@@ -0,0 +1,192 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.log4j.chainsaw;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.io.IOException;
+import java.util.Properties;
+import javax.swing.BorderFactory;
+import javax.swing.JFrame;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import org.apache.log4j.Logger;
+import org.apache.log4j.PropertyConfigurator;
+
+/**
+ * The main application.
+ *
+ * @author <a href="mailto:oliver@puppycrawl.com">Oliver Burn</a>
+ */
+public class Main
+    extends JFrame
+{
+    /** the default port number to listen on **/
+    private static final int DEFAULT_PORT = 4445;
+
+    /** name of property for port name **/
+    public static final String PORT_PROP_NAME = "chainsaw.port";
+
+    /** use to log messages **/
+    private static final Logger LOG = Logger.getLogger(Main.class);
+
+
+    /**
+     * Creates a new <code>Main</code> instance.
+     */
+    private Main() {
+        super("CHAINSAW - Log4J Log Viewer");
+        // create the all important model
+        final MyTableModel model = new MyTableModel();
+
+        //Create the menu bar.
+        final JMenuBar menuBar = new JMenuBar();
+        setJMenuBar(menuBar);
+        final JMenu menu = new JMenu("File");
+        menuBar.add(menu);
+
+        try {
+            final LoadXMLAction lxa = new LoadXMLAction(this, model);
+            final JMenuItem loadMenuItem = new JMenuItem("Load file...");
+            menu.add(loadMenuItem);
+            loadMenuItem.addActionListener(lxa);
+        } catch (NoClassDefFoundError e) {
+            LOG.info("Missing classes for XML parser", e);
+            JOptionPane.showMessageDialog(
+                this,
+                "XML parser not in classpath - unable to load XML events.",
+                "CHAINSAW",
+                JOptionPane.ERROR_MESSAGE);
+        } catch (Exception e) {
+            LOG.info("Unable to create the action to load XML files", e);
+            JOptionPane.showMessageDialog(
+                this,
+                "Unable to create a XML parser - unable to load XML events.",
+                "CHAINSAW",
+                JOptionPane.ERROR_MESSAGE);
+        }
+
+        final JMenuItem exitMenuItem = new JMenuItem("Exit");
+        menu.add(exitMenuItem);
+        exitMenuItem.addActionListener(ExitAction.INSTANCE);
+
+        // Add control panel
+        final ControlPanel cp = new ControlPanel(model);
+        getContentPane().add(cp, BorderLayout.NORTH);
+
+        // Create the table
+        final JTable table = new JTable(model);
+        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+        final JScrollPane scrollPane = new JScrollPane(table);
+        scrollPane.setBorder(BorderFactory.createTitledBorder("Events: "));
+        scrollPane.setPreferredSize(new Dimension(900, 300));
+
+        // Create the details
+        final JPanel details = new DetailPanel(table, model);
+        details.setPreferredSize(new Dimension(900, 300));
+
+        // Add the table and stack trace into a splitter
+        final JSplitPane jsp =
+            new JSplitPane(JSplitPane.VERTICAL_SPLIT, scrollPane, details);
+        getContentPane().add(jsp, BorderLayout.CENTER);
+
+        addWindowListener(new WindowAdapter() {
+                public void windowClosing(WindowEvent aEvent) {
+                    ExitAction.INSTANCE.actionPerformed(null);
+                }
+            });
+
+        pack();
+        setVisible(true);
+
+        setupReceiver(model);
+    }
+
+    /**
+     * Setup recieving messages.
+     *
+     * @param aModel a <code>MyTableModel</code> value
+     */
+    private void setupReceiver(MyTableModel aModel) {
+        int port = DEFAULT_PORT;
+        final String strRep = System.getProperty(PORT_PROP_NAME);
+        if (strRep != null) {
+            try {
+                port = Integer.parseInt(strRep);
+            } catch (NumberFormatException nfe) {
+                LOG.fatal("Unable to parse " + PORT_PROP_NAME +
+                          " property with value " + strRep + ".");
+                JOptionPane.showMessageDialog(
+                    this,
+                    "Unable to parse port number from '" + strRep +
+                    "', quitting.",
+                    "CHAINSAW",
+                    JOptionPane.ERROR_MESSAGE);
+                System.exit(1);
+            }
+        }
+
+        try {
+            final LoggingReceiver lr = new LoggingReceiver(aModel, port);
+            lr.start();
+        } catch (IOException e) {
+            LOG.fatal("Unable to connect to socket server, quiting", e);
+            JOptionPane.showMessageDialog(
+                this,
+                "Unable to create socket on port " + port + ", quitting.",
+                "CHAINSAW",
+                JOptionPane.ERROR_MESSAGE);
+            System.exit(1);
+        }
+    }
+
+
+    ////////////////////////////////////////////////////////////////////////////
+    // static methods
+    ////////////////////////////////////////////////////////////////////////////
+
+
+    /** initialise log4j **/
+    private static void initLog4J() {
+        final Properties props = new Properties();
+        props.setProperty("log4j.rootLogger", "DEBUG, A1");
+        props.setProperty("log4j.appender.A1",
+                          "org.apache.log4j.ConsoleAppender");
+        props.setProperty("log4j.appender.A1.layout",
+                          "org.apache.log4j.TTCCLayout");
+        PropertyConfigurator.configure(props);
+    }
+
+    /**
+     * The main method.
+     *
+     * @param aArgs ignored
+     */
+    public static void main(String[] aArgs) {
+        initLog4J();
+        new Main();
+    }
+}

Propchange: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/Main.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/MyTableModel.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/MyTableModel.java?rev=1345524&view=auto
==============================================================================
--- logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/MyTableModel.java (added)
+++ logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/MyTableModel.java Sat Jun  2 15:35:46 2012
@@ -0,0 +1,390 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.log4j.chainsaw;
+
+import java.text.DateFormat;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import javax.swing.table.AbstractTableModel;
+import org.apache.log4j.Priority;
+import org.apache.log4j.Logger;
+
+/**
+ * Represents a list of <code>EventDetails</code> objects that are sorted on
+ * logging time. Methods are provided to filter the events that are visible.
+ *
+ * @author <a href="mailto:oliver@puppycrawl.com">Oliver Burn</a>
+ */
+class MyTableModel
+    extends AbstractTableModel
+{
+
+    /** used to log messages **/
+    private static final Logger LOG = Logger.getLogger(MyTableModel.class);
+
+    /** use the compare logging events **/
+    private static final Comparator MY_COMP = new Comparator()
+    {
+        /** @see Comparator **/
+        public int compare(Object aObj1, Object aObj2) {
+            if ((aObj1 == null) && (aObj2 == null)) {
+                return 0; // treat as equal
+            } else if (aObj1 == null) {
+                return -1; // null less than everything
+            } else if (aObj2 == null) {
+                return 1; // think about it. :->
+            }
+
+            // will assume only have LoggingEvent
+            final EventDetails le1 = (EventDetails) aObj1;
+            final EventDetails le2 = (EventDetails) aObj2;
+
+            if (le1.getTimeStamp() < le2.getTimeStamp()) {
+                return 1;
+            }
+            // assume not two events are logged at exactly the same time
+            return -1;
+        }
+        };
+
+    /**
+     * Helper that actually processes incoming events.
+     * @author <a href="mailto:oliver@puppycrawl.com">Oliver Burn</a>
+     */
+    private class Processor
+        implements Runnable
+    {
+        /** loops getting the events **/
+        public void run() {
+            while (true) {
+                try {
+                    Thread.sleep(1000);
+                } catch (InterruptedException e) {
+                    // ignore
+                }
+
+                synchronized (mLock) {
+                    if (mPaused) {
+                        continue;
+                    }
+
+                    boolean toHead = true; // were events added to head
+                    boolean needUpdate = false;
+                    final Iterator it = mPendingEvents.iterator();
+                    while (it.hasNext()) {
+                        final EventDetails event = (EventDetails) it.next();
+                        mAllEvents.add(event);
+                        toHead = toHead && (event == mAllEvents.first());
+                        needUpdate = needUpdate || matchFilter(event);
+                    }
+                    mPendingEvents.clear();
+
+                    if (needUpdate) {
+                        updateFilteredEvents(toHead);
+                    }
+                }
+            }
+
+        }
+    }
+
+
+    /** names of the columns in the table **/
+    private static final String[] COL_NAMES = {
+        "Time", "Priority", "Trace", "Category", "NDC", "Message"};
+
+    /** definition of an empty list **/
+    private static final EventDetails[] EMPTY_LIST =  new EventDetails[] {};
+
+    /** used to format dates **/
+    private static final DateFormat DATE_FORMATTER =
+        DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);
+
+    /** the lock to control access **/
+    private final Object mLock = new Object();
+    /** set of all logged events - not filtered **/
+    private final SortedSet mAllEvents = new TreeSet(MY_COMP);
+    /** events that are visible after filtering **/
+    private EventDetails[] mFilteredEvents = EMPTY_LIST;
+    /** list of events that are buffered for processing **/
+    private final List mPendingEvents = new ArrayList();
+    /** indicates whether event collection is paused to the UI **/
+    private boolean mPaused = false;
+
+    /** filter for the thread **/
+    private String mThreadFilter = "";
+    /** filter for the message **/
+    private String mMessageFilter = "";
+    /** filter for the NDC **/
+    private String mNDCFilter = "";
+    /** filter for the category **/
+    private String mCategoryFilter = "";
+    /** filter for the priority **/
+    private Priority mPriorityFilter = Priority.DEBUG;
+
+
+    /**
+     * Creates a new <code>MyTableModel</code> instance.
+     *
+     */
+    MyTableModel() {
+        final Thread t = new Thread(new Processor());
+        t.setDaemon(true);
+        t.start();
+    }
+
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Table Methods
+    ////////////////////////////////////////////////////////////////////////////
+
+    /** @see javax.swing.table.TableModel **/
+    public int getRowCount() {
+        synchronized (mLock) {
+            return mFilteredEvents.length;
+        }
+    }
+
+    /** @see javax.swing.table.TableModel **/
+    public int getColumnCount() {
+        // does not need to be synchronized
+        return COL_NAMES.length;
+    }
+
+    /** @see javax.swing.table.TableModel **/
+    public String getColumnName(int aCol) {
+        // does not need to be synchronized
+        return COL_NAMES[aCol];
+    }
+
+    /** @see javax.swing.table.TableModel **/
+    public Class getColumnClass(int aCol) {
+        // does not need to be synchronized
+        return (aCol == 2) ? Boolean.class : Object.class;
+    }
+
+    /** @see javax.swing.table.TableModel **/
+    public Object getValueAt(int aRow, int aCol) {
+        synchronized (mLock) {
+            final EventDetails event = mFilteredEvents[aRow];
+
+            if (aCol == 0) {
+                return DATE_FORMATTER.format(new Date(event.getTimeStamp()));
+            } else if (aCol == 1) {
+                return event.getPriority();
+            } else if (aCol == 2) {
+                return (event.getThrowableStrRep() == null)
+                    ? Boolean.FALSE : Boolean.TRUE;
+            } else if (aCol == 3) {
+                return event.getCategoryName();
+            } else if (aCol == 4) {
+                return event.getNDC();
+            }
+            return event.getMessage();
+        }
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Public Methods
+    ////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * Sets the priority to filter events on. Only events of equal or higher
+     * property are now displayed.
+     *
+     * @param aPriority the priority to filter on
+     */
+    public void setPriorityFilter(Priority aPriority) {
+        synchronized (mLock) {
+            mPriorityFilter = aPriority;
+            updateFilteredEvents(false);
+        }
+    }
+
+    /**
+     * Set the filter for the thread field.
+     *
+     * @param aStr the string to match
+     */
+    public void setThreadFilter(String aStr) {
+        synchronized (mLock) {
+            mThreadFilter = aStr.trim();
+            updateFilteredEvents(false);
+        }
+    }
+
+    /**
+     * Set the filter for the message field.
+     *
+     * @param aStr the string to match
+     */
+    public void setMessageFilter(String aStr) {
+        synchronized (mLock) {
+            mMessageFilter = aStr.trim();
+            updateFilteredEvents(false);
+        }
+    }
+
+    /**
+     * Set the filter for the NDC field.
+     *
+     * @param aStr the string to match
+     */
+    public void setNDCFilter(String aStr) {
+        synchronized (mLock) {
+            mNDCFilter = aStr.trim();
+            updateFilteredEvents(false);
+        }
+    }
+
+    /**
+     * Set the filter for the category field.
+     *
+     * @param aStr the string to match
+     */
+    public void setCategoryFilter(String aStr) {
+        synchronized (mLock) {
+            mCategoryFilter = aStr.trim();
+            updateFilteredEvents(false);
+        }
+    }
+
+    /**
+     * Add an event to the list.
+     *
+     * @param aEvent a <code>EventDetails</code> value
+     */
+    public void addEvent(EventDetails aEvent) {
+        synchronized (mLock) {
+            mPendingEvents.add(aEvent);
+        }
+    }
+
+    /**
+     * Clear the list of all events.
+     */
+    public void clear() {
+        synchronized (mLock) {
+            mAllEvents.clear();
+            mFilteredEvents = new EventDetails[0];
+            mPendingEvents.clear();
+            fireTableDataChanged();
+        }
+    }
+
+    /** Toggle whether collecting events **/
+    public void toggle() {
+        synchronized (mLock) {
+            mPaused = !mPaused;
+        }
+    }
+
+    /** @return whether currently paused collecting events **/
+    public boolean isPaused() {
+        synchronized (mLock) {
+            return mPaused;
+        }
+    }
+
+    /**
+     * Get the throwable information at a specified row in the filtered events.
+     *
+     * @param aRow the row index of the event
+     * @return the throwable information
+     */
+    public EventDetails getEventDetails(int aRow) {
+        synchronized (mLock) {
+            return mFilteredEvents[aRow];
+        }
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Private methods
+    ////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * Update the filtered events data structure.
+     * @param aInsertedToFront indicates whether events were added to front of
+     *        the events. If true, then the current first event must still exist
+     *        in the list after the filter is applied.
+     */
+    private void updateFilteredEvents(boolean aInsertedToFront) {
+        final long start = System.currentTimeMillis();
+        final List filtered = new ArrayList();
+        final int size = mAllEvents.size();
+        final Iterator it = mAllEvents.iterator();
+
+        while (it.hasNext()) {
+            final EventDetails event = (EventDetails) it.next();
+            if (matchFilter(event)) {
+                filtered.add(event);
+            }
+        }
+
+        final EventDetails lastFirst = (mFilteredEvents.length == 0)
+            ? null
+            : mFilteredEvents[0];
+        mFilteredEvents = (EventDetails[]) filtered.toArray(EMPTY_LIST);
+
+        if (aInsertedToFront && (lastFirst != null)) {
+            final int index = filtered.indexOf(lastFirst);
+            if (index < 1) {
+                LOG.warn("In strange state");
+                fireTableDataChanged();
+            } else {
+                fireTableRowsInserted(0, index - 1);
+            }
+        } else {
+            fireTableDataChanged();
+        }
+
+        final long end = System.currentTimeMillis();
+        LOG.debug("Total time [ms]: " + (end - start)
+                  + " in update, size: " + size);
+    }
+
+    /**
+     * Returns whether an event matches the filters.
+     *
+     * @param aEvent the event to check for a match
+     * @return whether the event matches
+     */
+    private boolean matchFilter(EventDetails aEvent) {
+        if (aEvent.getPriority().isGreaterOrEqual(mPriorityFilter) &&
+            (aEvent.getThreadName().indexOf(mThreadFilter) >= 0) &&
+            (aEvent.getCategoryName().indexOf(mCategoryFilter) >= 0) &&
+            ((mNDCFilter.length() == 0) ||
+             ((aEvent.getNDC() != null) &&
+              (aEvent.getNDC().indexOf(mNDCFilter) >= 0))))
+        {
+            final String rm = aEvent.getMessage();
+            if (rm == null) {
+                // only match if we have not filtering in place
+                return (mMessageFilter.length() == 0);
+            } else {
+                return (rm.indexOf(mMessageFilter) >= 0);
+            }
+        }
+
+        return false; // by default not match
+    }
+}

Propchange: logging/log4j/branches/log4j12-bz53299/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/MyTableModel.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message