logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grobme...@apache.org
Subject svn commit: r1345492 [8/18] - in /logging/log4j/branches/log4j12modules: ./ contribs/ contribs/CekiGulcu/ contribs/EirikLygre/ contribs/JamesHouse/ contribs/Jamie Tsao/ contribs/JimMoore/ contribs/KevinSteppe/ contribs/KitchingSimon/ contribs/LeosLiter...
Date Sat, 02 Jun 2012 11:41:11 GMT
Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.14 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/patternLayout.14)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.14?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.14&p1=logging/log4j/branches/log4j12modules/tests/witness/patternLayout.14&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.2 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/patternLayout.2)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.2?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.2&p1=logging/log4j/branches/log4j12modules/tests/witness/patternLayout.2&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.3 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/patternLayout.3)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.3?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.3&p1=logging/log4j/branches/log4j12modules/tests/witness/patternLayout.3&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.4 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/patternLayout.4)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.4?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.4&p1=logging/log4j/branches/log4j12modules/tests/witness/patternLayout.4&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.5 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/patternLayout.5)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.5?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.5&p1=logging/log4j/branches/log4j12modules/tests/witness/patternLayout.5&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.6 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/patternLayout.6)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.6?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.6&p1=logging/log4j/branches/log4j12modules/tests/witness/patternLayout.6&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.7 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/patternLayout.7)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.7?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.7&p1=logging/log4j/branches/log4j12modules/tests/witness/patternLayout.7&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.8 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/patternLayout.8)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.8?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.8&p1=logging/log4j/branches/log4j12modules/tests/witness/patternLayout.8&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.9 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/patternLayout.9)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.9?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.9&p1=logging/log4j/branches/log4j12modules/tests/witness/patternLayout.9&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

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

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.mdc.clear (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/patternLayout.mdc.clear)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.mdc.clear?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/patternLayout.mdc.clear&p1=logging/log4j/branches/log4j12modules/tests/witness/patternLayout.mdc.clear&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/prudent (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/prudent)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/prudent?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/prudent&p1=logging/log4j/branches/log4j12modules/tests/witness/prudent&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

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

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

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

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

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

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

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/simple (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/simple)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/simple?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/simple&p1=logging/log4j/branches/log4j12modules/tests/witness/simple&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.1 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/socketServer.1)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.1?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.1&p1=logging/log4j/branches/log4j12modules/tests/witness/socketServer.1&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.2 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/socketServer.2)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.2?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.2&p1=logging/log4j/branches/log4j12modules/tests/witness/socketServer.2&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.3 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/socketServer.3)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.3?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.3&p1=logging/log4j/branches/log4j12modules/tests/witness/socketServer.3&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.4 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/socketServer.4)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.4?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.4&p1=logging/log4j/branches/log4j12modules/tests/witness/socketServer.4&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.5 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/socketServer.5)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.5?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.5&p1=logging/log4j/branches/log4j12modules/tests/witness/socketServer.5&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.6 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/socketServer.6)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.6?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.6&p1=logging/log4j/branches/log4j12modules/tests/witness/socketServer.6&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.7 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/socketServer.7)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.7?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.7&p1=logging/log4j/branches/log4j12modules/tests/witness/socketServer.7&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.8 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/socketServer.8)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.8?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/socketServer.8&p1=logging/log4j/branches/log4j12modules/tests/witness/socketServer.8&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/ttcc (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/ttcc)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/ttcc?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/ttcc&p1=logging/log4j/branches/log4j12modules/tests/witness/ttcc&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/xmlLayout.1 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/xmlLayout.1)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/xmlLayout.1?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/xmlLayout.1&p1=logging/log4j/branches/log4j12modules/tests/witness/xmlLayout.1&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/xmlLayout.2 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/xmlLayout.2)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/xmlLayout.2?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/xmlLayout.2&p1=logging/log4j/branches/log4j12modules/tests/witness/xmlLayout.2&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/xmlLayout.3 (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/xmlLayout.3)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/xmlLayout.3?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/xmlLayout.3&p1=logging/log4j/branches/log4j12modules/tests/witness/xmlLayout.3&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

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

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

Copied: logging/log4j/branches/log4j12modules/core/src/test/resources/witness/xmlLayout.null (from r1345481, logging/log4j/branches/log4j12modules/tests/witness/xmlLayout.null)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/resources/witness/xmlLayout.null?p2=logging/log4j/branches/log4j12modules/core/src/test/resources/witness/xmlLayout.null&p1=logging/log4j/branches/log4j12modules/tests/witness/xmlLayout.null&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

Copied: logging/log4j/branches/log4j12modules/core/src/test/run-tests.bat (from r1345481, logging/log4j/branches/log4j12modules/tests/run-tests.bat)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/run-tests.bat?p2=logging/log4j/branches/log4j12modules/core/src/test/run-tests.bat&p1=logging/log4j/branches/log4j12modules/tests/run-tests.bat&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

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

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

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

Copied: logging/log4j/branches/log4j12modules/core/src/test/sun_checks.xml (from r1345481, logging/log4j/branches/log4j12modules/tests/sun_checks.xml)
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/core/src/test/sun_checks.xml?p2=logging/log4j/branches/log4j12modules/core/src/test/sun_checks.xml&p1=logging/log4j/branches/log4j12modules/tests/sun_checks.xml&r1=1345481&r2=1345492&rev=1345492&view=diff
==============================================================================
    (empty)

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

Added: logging/log4j/branches/log4j12modules/modules/chainsaw/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/modules/chainsaw/pom.xml?rev=1345492&view=auto
==============================================================================
--- logging/log4j/branches/log4j12modules/modules/chainsaw/pom.xml (added)
+++ logging/log4j/branches/log4j12modules/modules/chainsaw/pom.xml Sat Jun  2 11:40:31 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/log4j12modules/modules/chainsaw/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java?rev=1345492&view=auto
==============================================================================
--- logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java (added)
+++ logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java Sat Jun  2 11:40:31 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/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java.orig
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java.orig?rev=1345492&view=auto
==============================================================================
--- logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java.orig (added)
+++ logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ControlPanel.java.orig Sat Jun  2 11:40:31 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);
+    }
+}

Added: logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java?rev=1345492&view=auto
==============================================================================
--- logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java (added)
+++ logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java Sat Jun  2 11:40:31 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/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java.orig
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java.orig?rev=1345492&view=auto
==============================================================================
--- logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java.orig (added)
+++ logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/DetailPanel.java.orig Sat Jun  2 11:40:31 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();
+    }
+}

Added: logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java?rev=1345492&view=auto
==============================================================================
--- logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java (added)
+++ logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java Sat Jun  2 11:40:31 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/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java.orig
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java.orig?rev=1345492&view=auto
==============================================================================
--- logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java.orig (added)
+++ logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/EventDetails.java.orig Sat Jun  2 11:40:31 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;
+    }
+}

Added: logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java?rev=1345492&view=auto
==============================================================================
--- logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java (added)
+++ logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java Sat Jun  2 11:40:31 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/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java.orig
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java.orig?rev=1345492&view=auto
==============================================================================
--- logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java.orig (added)
+++ logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/ExitAction.java.orig Sat Jun  2 11:40:31 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);
+    }
+}

Added: logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java?rev=1345492&view=auto
==============================================================================
--- logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java (added)
+++ logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java Sat Jun  2 11:40:31 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/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java.orig
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java.orig?rev=1345492&view=auto
==============================================================================
--- logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java.orig (added)
+++ logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoadXMLAction.java.orig Sat Jun  2 11:40:31 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();
+        }
+    }
+}

Added: logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoggingReceiver.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoggingReceiver.java?rev=1345492&view=auto
==============================================================================
--- logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoggingReceiver.java (added)
+++ logging/log4j/branches/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoggingReceiver.java Sat Jun  2 11:40:31 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/log4j12modules/modules/chainsaw/src/main/java/org/apache/log4j/chainsaw/LoggingReceiver.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message