Author: kwright
Date: Mon Apr 17 05:37:50 2017
New Revision: 1791660

URL: http://svn.apache.org/viewvc?rev=1791660&view=rev
Log:
Switch to using logging.xml, since it's better documented.

Added:
    
manifoldcf/branches/CONNECTORS-1290-3/framework/example-multiprocess-common/logging.xml
   (with props)
    
manifoldcf/branches/CONNECTORS-1290-3/framework/example-singleprocess-common/logging.xml
   (with props)
Removed:
    
manifoldcf/branches/CONNECTORS-1290-3/framework/example-multiprocess-common/logging.properties
    
manifoldcf/branches/CONNECTORS-1290-3/framework/example-singleprocess-common/logging.properties
Modified:
    manifoldcf/branches/CONNECTORS-1290-3/framework/build.xml
    
manifoldcf/branches/CONNECTORS-1290-3/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
    
manifoldcf/branches/CONNECTORS-1290-3/framework/core/src/test/java/org/apache/manifoldcf/core/tests/Base.java

Modified: manifoldcf/branches/CONNECTORS-1290-3/framework/build.xml
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1290-3/framework/build.xml?rev=1791660&r1=1791659&r2=1791660&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1290-3/framework/build.xml (original)
+++ manifoldcf/branches/CONNECTORS-1290-3/framework/build.xml Mon Apr 17 
05:37:50 2017
@@ -1577,7 +1577,6 @@
         <mkdir dir="dist/multiprocess-file-example"/>
         <copy todir="dist/multiprocess-file-example">
             <fileset dir="example-multiprocess-common">
-                <include name="logging.properties"/>
                 <include name="*.sh"/>
                 <include name="*.bat"/>
                 <include name="*.xml"/>
@@ -1606,7 +1605,6 @@
         <mkdir dir="dist/multiprocess-file-example-proprietary"/>
         <copy todir="dist/multiprocess-file-example-proprietary">
             <fileset dir="example-multiprocess-common">
-                <include name="logging.properties"/>
                 <include name="*.sh"/>
                 <include name="*.bat"/>
                 <include name="*.xml"/>
@@ -1637,7 +1635,6 @@
         <mkdir dir="dist/multiprocess-zk-example"/>
         <copy todir="dist/multiprocess-zk-example">
             <fileset dir="example-multiprocess-common">
-                <include name="logging.properties"/>
                 <include name="*.sh"/>
                 <include name="*.bat"/>
                 <include name="*.xml"/>
@@ -1670,7 +1667,6 @@
         <mkdir dir="dist/multiprocess-zk-example-proprietary"/>
         <copy todir="dist/multiprocess-zk-example-proprietary">
             <fileset dir="example-multiprocess-common">
-                <include name="logging.properties"/>
                 <include name="*.sh"/>
                 <include name="*.bat"/>
                 <include name="*.xml"/>
@@ -1726,7 +1722,6 @@
         <mkdir dir="dist/example/logs"/>
         <copy todir="dist/example">
             <fileset dir="example-singleprocess-common">
-                <include name="logging.properties"/>
                 <include name="*.sh"/>
                 <include name="*.bat"/>
                 <include name="*.xml"/>
@@ -1760,7 +1755,6 @@
         <mkdir dir="dist/example-proprietary/logs"/>
         <copy todir="dist/example-proprietary">
             <fileset dir="example-singleprocess-common">
-                <include name="logging.properties"/>
                 <include name="*.sh"/>
                 <include name="*.bat"/>
                 <include name="*.xml"/>

Modified: 
manifoldcf/branches/CONNECTORS-1290-3/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1290-3/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java?rev=1791660&r1=1791659&r2=1791660&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1290-3/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
 (original)
+++ 
manifoldcf/branches/CONNECTORS-1290-3/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
 Mon Apr 17 05:37:50 2017
@@ -265,7 +265,7 @@ public class ManifoldCF
             System.err.println("Couldn't find "+logConfigFileProperty+" 
property; using default");
             String configPath = (String)props.get("user.home") + 
"/"+applicationName;
             configPath = configPath.replace('\\', '/');
-            logConfigFile = new File(configPath,"logging.properties");
+            logConfigFile = new File(configPath,"logging.xml");
           }
 
           // Make sure that the registered entry points for polling and 
cleanup are cleared, just in case.

Modified: 
manifoldcf/branches/CONNECTORS-1290-3/framework/core/src/test/java/org/apache/manifoldcf/core/tests/Base.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1290-3/framework/core/src/test/java/org/apache/manifoldcf/core/tests/Base.java?rev=1791660&r1=1791659&r2=1791660&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1290-3/framework/core/src/test/java/org/apache/manifoldcf/core/tests/Base.java
 (original)
+++ 
manifoldcf/branches/CONNECTORS-1290-3/framework/core/src/test/java/org/apache/manifoldcf/core/tests/Base.java
 Mon Apr 17 05:37:50 2017
@@ -45,7 +45,7 @@ public class Base
 
       // First, write a properties file and a logging file, in the current 
directory.
       configFile = new File("properties.xml").getCanonicalFile();
-      loggingFile = new File("logging.ini").getCanonicalFile();
+      loggingFile = new File("logging.xml").getCanonicalFile();
       logOutputFile = new File("manifoldcf.log").getCanonicalFile();
       connectorFile = new File("connectors.xml").getCanonicalFile();
 
@@ -90,11 +90,20 @@ public class Base
     throws Exception
   {
     output.append(
-      
"log4j.appender.MAIN.File="+logOutputFile.getAbsolutePath().replaceAll("\\\\","/")+"\n"
 +
-      "log4j.rootLogger=WARN, MAIN\n" +
-      "log4j.appender.MAIN=org.apache.log4j.RollingFileAppender\n" +
-      "log4j.appender.MAIN.layout=org.apache.log4j.PatternLayout\n" +
-      "log4j.appender.MAIN.layout.ConversionPattern=%5p %d{ISO8601} (%t) - 
%m%n\n"
+"<Configuration status=\"warn\" name=\"ManifoldCF\" packages=\"\">\n"+
+"  <Appenders>\n"+
+"    <File name=\"MyFile\" 
fileName=\""+logOutputFile.getAbsolutePath().replaceAll("\\\\","/")+"\">\n"+
+"      <PatternLayout>\n"+
+"        <Pattern>%5p %d{ISO8601} (%t) - %m%n</Pattern>\n"+
+"      </PatternLayout>\n"+
+"    </File>\n"+
+"  </Appenders>\n"+
+"  <Loggers>\n"+
+"    <Root level=\"error\">\n"+
+"      <AppenderRef ref=\"MyFile\"/>\n"+
+"    </Root>\n"+
+"  </Loggers>\n"+
+"</Configuration>\n"
     );
   }
   

Added: 
manifoldcf/branches/CONNECTORS-1290-3/framework/example-multiprocess-common/logging.xml
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1290-3/framework/example-multiprocess-common/logging.xml?rev=1791660&view=auto
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1290-3/framework/example-multiprocess-common/logging.xml
 (added)
+++ 
manifoldcf/branches/CONNECTORS-1290-3/framework/example-multiprocess-common/logging.xml
 Mon Apr 17 05:37:50 2017
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<Configuration status="warn" name="ManifoldCF" packages="">
+  <Appenders>
+    <File name="MyFile" fileName="logs/manifoldcf.log">
+      <PatternLayout>
+        <Pattern>%5p %d{ISO8601} (%t) - %m%n</Pattern>
+      </PatternLayout>
+    </File>
+  </Appenders>
+  <Loggers>
+    <Root level="error">
+      <AppenderRef ref="MyFile"/>
+    </Root>
+  </Loggers>
+</Configuration>

Propchange: 
manifoldcf/branches/CONNECTORS-1290-3/framework/example-multiprocess-common/logging.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
manifoldcf/branches/CONNECTORS-1290-3/framework/example-singleprocess-common/logging.xml
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1290-3/framework/example-singleprocess-common/logging.xml?rev=1791660&view=auto
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1290-3/framework/example-singleprocess-common/logging.xml
 (added)
+++ 
manifoldcf/branches/CONNECTORS-1290-3/framework/example-singleprocess-common/logging.xml
 Mon Apr 17 05:37:50 2017
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<Configuration status="warn" name="ManifoldCF" packages="">
+  <Appenders>
+    <File name="MyFile" fileName="logs/manifoldcf.log">
+      <PatternLayout>
+        <Pattern>%5p %d{ISO8601} (%t) - %m%n</Pattern>
+      </PatternLayout>
+    </File>
+  </Appenders>
+  <Loggers>
+    <Root level="error">
+      <AppenderRef ref="MyFile"/>
+    </Root>
+  </Loggers>
+</Configuration>

Propchange: 
manifoldcf/branches/CONNECTORS-1290-3/framework/example-singleprocess-common/logging.xml
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to