jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1551030 - in /jena/trunk: jena-arq/src/main/java/arq/ jena-arq/src/main/java/arq/cmdline/ jena-arq/src/main/java/org/apache/jena/atlas/logging/ jena-arq/src/main/java/org/apache/jena/atlas/web/ jena-fuseki/src/main/java/org/apache/jena/fus...
Date Sun, 15 Dec 2013 17:02:20 GMT
Author: andy
Date: Sun Dec 15 17:02:19 2013
New Revision: 1551030

URL: http://svn.apache.org/r1551030
Log:
Refactor logging support into control, which needs Log4J access, and helpers, which just works with SLF4J.
JENA-583 (step on the way)

Added:
    jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/LogCmd.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/LogCtl.java
Modified:
    jena/trunk/jena-arq/src/main/java/arq/cmdline/CmdMain.java
    jena/trunk/jena-arq/src/main/java/arq/qexpr.java
    jena/trunk/jena-arq/src/main/java/arq/query.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/FmtLog.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/Log.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/web/MediaType.java
    jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
    jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java
    jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/TestAuth.java
    jena/trunk/jena-spatial/src/main/java/examples/JenaSpatialExample1.java
    jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdIndexBuild.java
    jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdIndexCopy.java
    jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdNodeTableBuilder.java
    jena/trunk/jena-tdb/src/main/java/tdb/cmdline/CmdTDB.java
    jena/trunk/jena-tdb/src/main/java/tdb/tdbreorder.java
    jena/trunk/jena-tdb/src/main/java/tdb/tools/dumpbpt.java
    jena/trunk/jena-tdb/src/main/java/tdb/tools/dumpnodetable.java
    jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/base/block/TestBlockMgrMapped.java
    jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_QuadsObjectIsNull.java
    jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TDBWriteTransaction.java
    jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TransSystem.java
    jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TransSystemMultiDatasets.java
    jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TxnDeadlockTest.java
    jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/bplustree/CmdTestBPlusTreeRewriter.java
    jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TestLoader.java
    jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/transaction/AbstractTestTransSeq.java
    jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/transaction/TestTransactionTDB.java
    jena/trunk/jena-text/src/main/java/examples/JenaTextExample1.java

Modified: jena/trunk/jena-arq/src/main/java/arq/cmdline/CmdMain.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/arq/cmdline/CmdMain.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/arq/cmdline/CmdMain.java (original)
+++ jena/trunk/jena-arq/src/main/java/arq/cmdline/CmdMain.java Sun Dec 15 17:02:19 2013
@@ -18,7 +18,7 @@
 
 package arq.cmdline;
 
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import arq.cmd.CmdException ;
 import arq.cmd.TerminationException ;
 
@@ -38,7 +38,7 @@ public abstract class CmdMain extends Cm
 {
     // Do this very early so it happens before anything else
     // gets a chance to create a logger.
-    static { Log.setCmdLogging() ; }
+    static { LogCtl.setCmdLogging() ; }
     
     public CmdMain(String[] args)
     {

Modified: jena/trunk/jena-arq/src/main/java/arq/qexpr.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/arq/qexpr.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/arq/qexpr.java (original)
+++ jena/trunk/jena-arq/src/main/java/arq/qexpr.java Sun Dec 15 17:02:19 2013
@@ -21,7 +21,7 @@ package arq;
 import java.util.Iterator ;
 
 import org.apache.jena.atlas.io.IndentedWriter ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import arq.cmd.CmdException ;
 import arq.cmd.CmdUtils ;
 import arq.cmd.TerminationException ;
@@ -51,7 +51,7 @@ import com.hp.hpl.jena.sparql.util.NodeF
 public class qexpr
 {
     // TODO Convert to extends CmdArgModule 
-    static { Log.setLog4j() ; CmdUtils.setN3Params() ; }
+    static { LogCtl.setLog4j() ; CmdUtils.setN3Params() ; }
 
     public static void main (String... argv)
     {

Modified: jena/trunk/jena-arq/src/main/java/arq/query.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/arq/query.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/arq/query.java (original)
+++ jena/trunk/jena-arq/src/main/java/arq/query.java Sun Dec 15 17:02:19 2013
@@ -19,7 +19,7 @@
 package arq;
 
 import org.apache.jena.atlas.io.IndentedWriter ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import org.apache.jena.riot.RiotException ;
 import org.apache.jena.riot.SysRIOT ;
 import arq.cmd.CmdException ;
@@ -194,7 +194,7 @@ public class query extends CmdARQ
             }
             
             if ( isQuiet() )
-                Log.setError(SysRIOT.riotLoggerName) ;
+                LogCtl.setError(SysRIOT.riotLoggerName) ;
             Dataset dataset = getDataset() ;
             modTime.startTimer() ;
             QueryExecution qe = QueryExecutionFactory.create(query, dataset) ;

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/FmtLog.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/FmtLog.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/FmtLog.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/FmtLog.java Sun Dec 15 17:02:19 2013
@@ -22,8 +22,13 @@ import java.util.IllegalFormatException 
 
 import org.slf4j.Logger ;
 
+/** Logging with String.format (which can be a expensive)
+ *  The formatting operations are not designed specifically for performance, 
+ *  but they do delay forming strings for output
+ *  until it is know that a log message is actually
+ *  required by level setting. 
+ */
 public class FmtLog {
-
     // -- Delayed argument formatting.
     /* Log at 'trace' level. */
     public static void trace(Logger log, String fmt, Object...args) {

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/Log.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/Log.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/Log.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/Log.java Sun Dec 15 17:02:19 2013
@@ -18,26 +18,10 @@
 
 package org.apache.jena.atlas.logging ;
 
-import java.io.ByteArrayInputStream ;
-import java.io.File ;
-import java.io.FileInputStream ;
-import java.io.IOException ;
-import java.io.InputStream ;
-import java.util.Properties ;
-
-import org.apache.jena.atlas.AtlasException ;
-import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.riot.SysRIOT ;
-import org.apache.log4j.PropertyConfigurator ;
-import org.apache.log4j.xml.DOMConfigurator ;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
 
 /* Simple wrappers and operations for convenient, non-time critical logging.
- * The formatting operations are not designed specifically for performance, 
- * but they do delay forming strings for output
- * until it is know that a log message is actually
- * required by level setting. 
  */
 public class Log {
     private Log() {}
@@ -122,276 +106,19 @@ public class Log {
         log(caller).error(msg) ;
     }
 
-    static public Logger log(Class<? > cls) {
+    static private Logger log(Class<? > cls) {
         return LoggerFactory.getLogger(cls) ;
     }
 
-    static public Logger log(String loggerName) {
+    static private Logger log(String loggerName) {
         return LoggerFactory.getLogger(loggerName) ;
     }
-
-    /**
-     * Turn on a logger (all levels). Works for Log4j and Java logging as the
-     * logging provider to Apache common logging or slf4j.
-     */
-
-    static public void enable(Logger logger) {
-        enable(logger.getName()) ;
-    }
-
-    static public void enable(String logger) {
-        enable(logger, "all") ;
-    }
-
-    static public void enable(Logger logger, String level) {
-        enable(logger.getName(), level) ;
-    }
-
-    /** Turn on a logger (specific level levels) */
-    static public void enable(Class<? > logger, String level) {
-        enable(logger.getClass().getName(), level) ;
-    }
-
-    static public void enable(String logger, String level) {
-        org.apache.log4j.Level level1 = org.apache.log4j.Level.ALL ;
-        java.util.logging.Level level2 = java.util.logging.Level.ALL ;
-        if ( level.equalsIgnoreCase("info") ) {
-            level1 = org.apache.log4j.Level.INFO ;
-            level2 = java.util.logging.Level.INFO ;
-        }
-
-        if ( level.equalsIgnoreCase("debug") ) {
-            level1 = org.apache.log4j.Level.DEBUG ;
-            level2 = java.util.logging.Level.FINE ;
-        }
-
-        if ( level.equalsIgnoreCase("warn") ) {
-            level1 = org.apache.log4j.Level.WARN ;
-            level2 = java.util.logging.Level.WARNING ;
-        }
-        if ( level.equalsIgnoreCase("error") ) {
-            level1 = org.apache.log4j.Level.ERROR ;
-            level2 = java.util.logging.Level.SEVERE ;
-        }
-        logLevel(logger, level1, level2) ;
-    }
-
-    static public void logLevel(String logger, org.apache.log4j.Level level1, java.util.logging.Level level2) {
-        if ( level1 != null )
-            org.apache.log4j.LogManager.getLogger(logger).setLevel(level1) ;
-        if ( level2 != null )
-            java.util.logging.Logger.getLogger(logger).setLevel(level2) ;
-    }
-
-    /**
-     * Turn on a logger (all levels). Works for Log4j and Java logging as the
-     * logging provider to Apache common logging or slf4j.
-     */
-    static public void enable(Class<? > logger) {
-        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.ALL) ;
-        java.util.logging.Logger.getLogger(logger.getName()).setLevel(java.util.logging.Level.ALL) ;
-    }
-
-    /**
-     * Turn on a logger (all levels). Works for Log4j and Java logging as the
-     * logging provider to Apache common logging or slf4j.
-     */
-    static public void disable(String logger) {
-        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.OFF) ;
-        java.util.logging.Logger.getLogger(logger).setLevel(java.util.logging.Level.OFF) ;
-    }
-
-    /**
-     * Turn on a logger (all levels). Works for Log4j and Java logging as the
-     * logging provider to Apache common logging or slf4j.
-     */
-    static public void disable(Class<? > logger) {
-        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.OFF) ;
-        java.util.logging.Logger.getLogger(logger.getName()).setLevel(java.util.logging.Level.OFF) ;
-    }
-
-    /**
-     * Set to warning level. Works for Log4j and Java logging as the logging
-     * provider to Apache common logging or slf4j.
-     */
-    static public void setWarn(String logger) {
-        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.WARN) ;
-        java.util.logging.Logger.getLogger(logger).setLevel(java.util.logging.Level.WARNING) ;
-    }
-
-    /**
-     * Set to warning level. Works for Log4j and Java logging as the logging
-     * provider to Apache common logging or slf4j.
-     */
-    static public void setWarn(Class<? > logger) {
-        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.WARN) ;
-        java.util.logging.Logger.getLogger(logger.getName()).setLevel(java.util.logging.Level.WARNING) ;
-    }
-
-    /**
-     * Set to error level. Works for Log4j and Java logging as the logging
-     * provider to Apache common logging or slf4j.
-     */
-    static public void setError(String logger) {
-        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.ERROR) ;
-        java.util.logging.Logger.getLogger(logger).setLevel(java.util.logging.Level.SEVERE) ;
-    }
-
-    /**
-     * Set to error level. Works for Log4j and Java logging as the logging
-     * provider to Apache common logging or slf4j.
-     */
-    static public void setError(Class<? > logger) {
-        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.ERROR) ;
-        java.util.logging.Logger.getLogger(logger.getName()).setLevel(java.util.logging.Level.SEVERE) ;
-    }
-
-    /**
-     * Set to infomation level. Works for Log4j and Java logging as the logging
-     * provider to Apache common logging or slf4j.
-     */
-    static public void setInfo(String logger) {
-        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.INFO) ;
-        java.util.logging.Logger.getLogger(logger).setLevel(java.util.logging.Level.INFO) ;
-    }
-
-    /**
-     * Set to infomation level. Works for Log4j and Java logging as the logging
-     * provider to Apache common logging or slf4j.
-     */
-    static public void setInfo(Class<? > logger) {
-        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.INFO) ;
-        java.util.logging.Logger.getLogger(logger.getName()).setLevel(java.util.logging.Level.INFO) ;
-    }
-
-    /**
-     * Set logging
-     * <ol>
-     * <li>Check for -Dlog4j.configuration.</li>
-     * <li>Looks for log4j.properties file in current directory.</li>
-     * </ol>
-     * Return true if we think Log4J is not initialized.
-     */
-
-    public static boolean setLog4j() {
-        if ( System.getProperty("log4j.configuration") == null ) {
-            String fn = "log4j.properties" ;
-            File f = new File(fn) ;
-            if ( f.exists() )
-                System.setProperty("log4j.configuration", "file:" + fn) ;
-        }
-
-        return (System.getProperty("log4j.configuration") != null) ;
-    }
-
-    /** Set log4j properties (XML or properties file) */
-    public static void setLog4j(String filename) {
-        if ( filename.toLowerCase().endsWith(".xml") )
-            DOMConfigurator.configure(filename) ;
-        else
-            PropertyConfigurator.configure(filename) ;
-    }
-
-    private static String log4Jsetup = StrUtils.strjoinNL("## Plain output to stdout",
-                                                          "log4j.appender.jena.plain=org.apache.log4j.ConsoleAppender",
-                                                          "log4j.appender.jena.plain.target=System.out",
-                                                          "log4j.appender.jena.plain.layout=org.apache.log4j.PatternLayout",
-                                                          "log4j.appender.jena.plain.layout.ConversionPattern=%m%n"
-
-                                                          ,
-                                                          "## Plain output with level, to stderr",
-                                                          "log4j.appender.jena.plainlevel=org.apache.log4j.ConsoleAppender",
-                                                          "log4j.appender.jena.plainlevel.target=System.err",
-                                                          "log4j.appender.jena.plainlevel.layout=org.apache.log4j.PatternLayout",
-                                                          "log4j.appender.jena.plainlevel.layout.ConversionPattern=%-5p %m%n"
-
-                                                          , "## Everything", "log4j.rootLogger=INFO, jena.plainlevel",
-                                                          "log4j.logger.com.hp.hpl.jena=WARN",
-                                                          "log4j.logger.org.openjena=WARN",
-                                                          "log4j.logger.org.apache.jena=WARN",
-                                                          "log4j.logger.org.apache.jena.tdb.loader=INFO"
-
-                                                          , "## Parser output", "log4j.additivity."
-                                                                                + SysRIOT.riotLoggerName + "=false",
-                                                          "log4j.logger." + SysRIOT.riotLoggerName
-                                                              + "=INFO, jena.plainlevel ") ;
-
-    /**
-     * Set logging, suitable for a command line application.
-     * <ol>
-     * <li>Check for -Dlog4j.configuration.</li>
-     * <li>Looks for log4j.properties file in current directory.</li>
-     * <li>Sets log4j using an internal configuration.</li>
-     * </ol>
-     */
-    public static void setCmdLogging() {
-        setCmdLogging(log4Jsetup) ;
-    }
-
-    /**
-     * Set logging, suitable for a command line application.
-     * <ol>
-     * <li>Check for -Dlog4j.configuration.</li>
-     * <li>Looks for log4j.properties file in current directory.</li>
-     * <li>Sets log4j using the provided default configuration.</li>
-     * </ol>
-     * T
-     */
-    public static void setCmdLogging(String defaultConfig) {
-        if ( !setLog4j() )
-            resetLogging(log4Jsetup) ;
-    }
-
-    public static void resetLogging(String config) {
-        Properties p = new Properties() ;
-        InputStream in = new ByteArrayInputStream(StrUtils.asUTF8bytes(config)) ;
-        try {
-            p.load(in) ;
-        } catch (IOException ex) {}
-        PropertyConfigurator.configure(p) ;
-        System.setProperty("log4j.configuration", "set") ;
-    }
-
-    // ---- java.util.logging - because that's always present.
-    static String defaultProperties = StrUtils.strjoinNL(
-                                                         // Handlers - output
-                                                         // All (comma
-                                                         // separated)
-                                                         // "handlers=java.util.logging.ConsoleHandler,org.openjena.atlas.logging.java.ConsoleHandlerStdout",
-
-                                                         // Atlas.
-                                                         "handlers=org.openjena.atlas.logging.java.ConsoleHandlerStdout",
-                                                         "org.openjena.atlas.logging.java.ConsoleHandlerStdout.level=INFO",
-                                                         "java.util.logging.ConsoleHandler.formatter=atlas.logging.java.TextFormatter"
-
-                                    // Provided by the JRE
-                                    // "handlers=java.util.logging.ConsoleHandler"
-                                    // ,
-                                    // ,
-                                    // "java.util.logging.ConsoleHandler.level=INFO",
-
-                                    ) ;
-
-    public static void setJavaLogging() {
-        setJavaLogging("logging.properties") ;
-    }
-
-    public static void setJavaLogging(String file) {
-        try {
-            InputStream details = new FileInputStream(file) ;
-            java.util.logging.LogManager.getLogManager().readConfiguration(details) ;
-        } catch (Exception ex) {
-            throw new AtlasException(ex) ;
-        }
-    }
-
-    public static void setJavaLoggingDft() {
-        try {
-            InputStream details = new ByteArrayInputStream(defaultProperties.getBytes("UTF-8")) ;
-            java.util.logging.LogManager.getLogManager().readConfiguration(details) ;
-
-        } catch (Exception ex) {
-            throw new AtlasException(ex) ;
-        }
-    }
+    
+    /** @deprecated Use {@linkplain LogCtl#setLog4j} */
+    @Deprecated
+    static public void setLog4j() { LogCtl.setLog4j() ; }
+
+    /** @deprecated Use {@linkplain LogCtl#setCmdLogging} */
+    @Deprecated
+    static public void setCmdLogging() { LogCtl.setCmdLogging(); }
 }

Added: jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/LogCmd.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/LogCmd.java?rev=1551030&view=auto
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/LogCmd.java (added)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/LogCmd.java Sun Dec 15 17:02:19 2013
@@ -0,0 +1,24 @@
+/**
+ * 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.jena.atlas.logging;
+
+public class LogCmd {
+
+}
+

Added: jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/LogCtl.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/LogCtl.java?rev=1551030&view=auto
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/LogCtl.java (added)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/logging/LogCtl.java Sun Dec 15 17:02:19 2013
@@ -0,0 +1,294 @@
+/**
+ * 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.jena.atlas.logging;
+
+import java.io.* ;
+import java.util.Properties ;
+
+import org.apache.jena.atlas.AtlasException ;
+import org.apache.jena.atlas.lib.StrUtils ;
+import org.apache.jena.riot.SysRIOT ;
+import org.apache.log4j.PropertyConfigurator ;
+import org.apache.log4j.xml.DOMConfigurator ;
+import org.slf4j.Logger ;
+
+/** Setup and control of logging - needs access to log4j binaries */ 
+public class LogCtl {
+
+    /**
+     * Turn on a logger (all levels). Works for Log4j and Java logging as the
+     * logging provider to Apache common logging or slf4j.
+     */
+    
+    static public void enable(Logger logger) {
+        enable(logger.getName()) ;
+    }
+
+    static public void enable(String logger) {
+        set(logger, "all") ;
+    }
+
+    static public void set(Logger logger, String level) {
+        set(logger.getName(), level) ;
+    }
+
+    /** Turn on a logger (specific level levels) */
+    static public void set(Class<? > logger, String level) {
+        set(logger.getClass().getName(), level) ;
+    }
+
+    static public void set(String logger, String level) {
+        org.apache.log4j.Level level1 = org.apache.log4j.Level.ALL ;
+        java.util.logging.Level level2 = java.util.logging.Level.ALL ;
+        if ( level.equalsIgnoreCase("info") ) {
+            level1 = org.apache.log4j.Level.INFO ;
+            level2 = java.util.logging.Level.INFO ;
+        }
+    
+        if ( level.equalsIgnoreCase("debug") ) {
+            level1 = org.apache.log4j.Level.DEBUG ;
+            level2 = java.util.logging.Level.FINE ;
+        }
+    
+        if ( level.equalsIgnoreCase("warn") ) {
+            level1 = org.apache.log4j.Level.WARN ;
+            level2 = java.util.logging.Level.WARNING ;
+        }
+        if ( level.equalsIgnoreCase("error") ) {
+            level1 = org.apache.log4j.Level.ERROR ;
+            level2 = java.util.logging.Level.SEVERE ;
+        }
+        logLevel(logger, level1, level2) ;
+    }
+
+    static public void logLevel(String logger, org.apache.log4j.Level level1, java.util.logging.Level level2) {
+        if ( level1 != null )
+            org.apache.log4j.LogManager.getLogger(logger).setLevel(level1) ;
+        if ( level2 != null )
+            java.util.logging.Logger.getLogger(logger).setLevel(level2) ;
+    }
+
+    /**
+     * Turn on a logger (all levels). Works for Log4j and Java logging as the
+     * logging provider to Apache common logging or slf4j.
+     */
+    static public void enable(Class<? > logger) {
+        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.ALL) ;
+        java.util.logging.Logger.getLogger(logger.getName()).setLevel(java.util.logging.Level.ALL) ;
+    }
+
+    /**
+     * Turn on a logger (all levels). Works for Log4j and Java logging as the
+     * logging provider to Apache common logging or slf4j.
+     */
+    static public void disable(String logger) {
+        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.OFF) ;
+        java.util.logging.Logger.getLogger(logger).setLevel(java.util.logging.Level.OFF) ;
+    }
+
+    /**
+     * Turn on a logger (all levels). Works for Log4j and Java logging as the
+     * logging provider to Apache common logging or slf4j.
+     */
+    static public void disable(Class<? > logger) {
+        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.OFF) ;
+        java.util.logging.Logger.getLogger(logger.getName()).setLevel(java.util.logging.Level.OFF) ;
+    }
+
+    /**
+     * Set to info level. Works for Log4j and Java logging as the logging
+     * provider to Apache common logging or slf4j.
+     */
+    static public void setInfo(String logger) {
+        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.INFO) ;
+        java.util.logging.Logger.getLogger(logger).setLevel(java.util.logging.Level.INFO) ;
+    }
+
+    /**
+     * Set to info level. Works for Log4j and Java logging as the logging
+     * provider to Apache common logging or slf4j.
+     */
+    static public void setInfo(Class<? > logger) {
+        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.INFO) ;
+        java.util.logging.Logger.getLogger(logger.getName()).setLevel(java.util.logging.Level.INFO) ;
+    }
+
+    /**
+     * Set to warning level. Works for Log4j and Java logging as the logging
+     * provider to Apache common logging or slf4j.
+     */
+    static public void setWarn(String logger) {
+        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.WARN) ;
+        java.util.logging.Logger.getLogger(logger).setLevel(java.util.logging.Level.WARNING) ;
+    }
+
+    /**
+     * Set to warning level. Works for Log4j and Java logging as the logging
+     * provider to Apache common logging or slf4j.
+     */
+    static public void setWarn(Class<? > logger) {
+        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.WARN) ;
+        java.util.logging.Logger.getLogger(logger.getName()).setLevel(java.util.logging.Level.WARNING) ;
+    }
+
+    /**
+     * Set to error level. Works for Log4j and Java logging as the logging
+     * provider to Apache common logging or slf4j.
+     */
+    static public void setError(String logger) {
+        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.ERROR) ;
+        java.util.logging.Logger.getLogger(logger).setLevel(java.util.logging.Level.SEVERE) ;
+    }
+
+    /**
+     * Set to error level. Works for Log4j and Java logging as the logging
+     * provider to Apache common logging or slf4j.
+     */
+    static public void setError(Class<? > logger) {
+        org.apache.log4j.LogManager.getLogger(logger).setLevel(org.apache.log4j.Level.ERROR) ;
+        java.util.logging.Logger.getLogger(logger.getName()).setLevel(java.util.logging.Level.SEVERE) ;
+    }
+
+    private static String log4Jsetup = StrUtils.strjoinNL
+    ("## Plain output to stdout",
+     "log4j.appender.jena.plain=org.apache.log4j.ConsoleAppender",
+     "log4j.appender.jena.plain.target=System.out",
+     "log4j.appender.jena.plain.layout=org.apache.log4j.PatternLayout",
+     "log4j.appender.jena.plain.layout.ConversionPattern=%m%n"
+    
+     ,
+     "## Plain output with level, to stderr",
+     "log4j.appender.jena.plainlevel=org.apache.log4j.ConsoleAppender",
+     "log4j.appender.jena.plainlevel.target=System.err",
+     "log4j.appender.jena.plainlevel.layout=org.apache.log4j.PatternLayout",
+     "log4j.appender.jena.plainlevel.layout.ConversionPattern=%-5p %m%n"
+    
+     , "## Everything", "log4j.rootLogger=INFO, jena.plainlevel",
+     "log4j.logger.com.hp.hpl.jena=WARN",
+     "log4j.logger.org.openjena=WARN",
+     "log4j.logger.org.apache.jena=WARN",
+     "log4j.logger.org.apache.jena.tdb.loader=INFO"
+    
+     , "## Parser output", "log4j.additivity."
+         + SysRIOT.riotLoggerName + "=false",
+         "log4j.logger." + SysRIOT.riotLoggerName
+         + "=INFO, jena.plainlevel ") ;
+    // ---- java.util.logging - because that's always present.
+    static String defaultProperties = StrUtils.strjoinNL
+        (
+         // Handlers - output
+         // All (comma
+         // separated)
+         // "handlers=java.util.logging.ConsoleHandler,org.openjena.atlas.logging.java.ConsoleHandlerStdout",
+    
+         // Atlas.
+         "handlers=org.openjena.atlas.logging.java.ConsoleHandlerStdout",
+         "org.openjena.atlas.logging.java.ConsoleHandlerStdout.level=INFO",
+         "java.util.logging.ConsoleHandler.formatter=atlas.logging.java.TextFormatter"
+    ) ;
+
+    /**
+     * Set logging
+     * <ol>
+     * <li>Check for -Dlog4j.configuration.</li>
+     * <li>Looks for log4j.properties file in current directory.</li>
+     * </ol>
+     * Return true if we think Log4J is not initialized.
+     */
+    
+    public static boolean setLog4j() {
+        if ( System.getProperty("log4j.configuration") == null ) {
+            String fn = "log4j.properties" ;
+            File f = new File(fn) ;
+            if ( f.exists() )
+                System.setProperty("log4j.configuration", "file:" + fn) ;
+        }
+    
+        return (System.getProperty("log4j.configuration") != null) ;
+    }
+
+    /** Set log4j properties (XML or properties file) */
+    public static void setLog4j(String filename) {
+        if ( filename.toLowerCase().endsWith(".xml") )
+            DOMConfigurator.configure(filename) ;
+        else
+            PropertyConfigurator.configure(filename) ;
+    }
+
+    /**
+     * Set logging, suitable for a command line application.
+     * <ol>
+     * <li>Check for -Dlog4j.configuration.</li>
+     * <li>Looks for log4j.properties file in current directory.</li>
+     * <li>Sets log4j using an internal configuration.</li>
+     * </ol>
+     */
+    public static void setCmdLogging() {
+        setCmdLogging(log4Jsetup) ;
+    }
+
+    /**
+     * Set logging, suitable for a command line application.
+     * <ol>
+     * <li>Check for -Dlog4j.configuration.</li>
+     * <li>Looks for log4j.properties file in current directory.</li>
+     * <li>Sets log4j using the provided default configuration.</li>
+     * </ol>
+     * T
+     */
+    public static void setCmdLogging(String defaultConfig) {
+        if ( !setLog4j() )
+            resetLogging(log4Jsetup) ;
+    }
+
+    public static void resetLogging(String config) {
+        Properties p = new Properties() ;
+        InputStream in = new ByteArrayInputStream(StrUtils.asUTF8bytes(config)) ;
+        try {
+            p.load(in) ;
+        } catch (IOException ex) {}
+        PropertyConfigurator.configure(p) ;
+        System.setProperty("log4j.configuration", "set") ;
+    }
+
+    public static void setJavaLogging() {
+        setJavaLogging("logging.properties") ;
+    }
+
+    public static void setJavaLogging(String file) {
+        try {
+            InputStream details = new FileInputStream(file) ;
+            java.util.logging.LogManager.getLogManager().readConfiguration(details) ;
+        } catch (Exception ex) {
+            throw new AtlasException(ex) ;
+        }
+    }
+
+    public static void setJavaLoggingDft() {
+        try {
+            InputStream details = new ByteArrayInputStream(defaultProperties.getBytes("UTF-8")) ;
+            java.util.logging.LogManager.getLogManager().readConfiguration(details) ;
+    
+        } catch (Exception ex) {
+            throw new AtlasException(ex) ;
+        }
+    }
+
+}
+

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/web/MediaType.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/web/MediaType.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/web/MediaType.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/atlas/web/MediaType.java Sun Dec 15 17:02:19 2013
@@ -16,56 +16,58 @@
  * limitations under the License.
  */
 
-package org.apache.jena.atlas.web;
+package org.apache.jena.atlas.web ;
 
 import static org.apache.jena.atlas.lib.Lib.equal ;
 import static org.apache.jena.atlas.lib.Lib.hashCodeObject ;
 
-import java.util.Iterator ;
 import java.util.LinkedHashMap ;
 import java.util.Map ;
 
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
 
-/** A structure to represent a <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7">media type</a>.
- * See also the <a href="http://httpd.apache.org/docs/current/content-negotiation.html">Apache httpd documentation</a>.
+/**
+ * A structure to represent a <a
+ * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7">media
+ * type</a>. See also the <a
+ * href="http://httpd.apache.org/docs/current/content-negotiation.html">Apache
+ * httpd documentation</a>.
  */
-public class MediaType
-{
-    private static Logger log = LoggerFactory.getLogger(MediaType.class) ; 
+public class MediaType {
+    private static Logger             log        = LoggerFactory.getLogger(MediaType.class) ;
 
-    private static final String strCharset              = "charset" ;
+    private static final String       strCharset = "charset" ;
 
-    private final String type ;
-    private final String subType ;
+    private final String              type ;
+    private final String              subType ;
     // Keys in insertion order.
-    private final Map<String, String> params ;//= new LinkedHashMap<String, String>() ;
-   
-    protected MediaType(ParsedMediaType parser)
-    {
+    private final Map<String, String> params ;                                                // =
+                                                                                              // new
+                                                                                              // LinkedHashMap<String,
+                                                                                              // String>()
+                                                                                              // ;
+
+    protected MediaType(ParsedMediaType parser) {
         this.type = parser.type ;
         this.subType = parser.subType ;
         this.params = parser.params ;
     }
-    
-    public MediaType(MediaType other)
-    {
+
+    public MediaType(MediaType other) {
         this.type = other.type ;
         this.subType = other.subType ;
         // Order preserving copy.
         this.params = new LinkedHashMap<String, String>(other.params) ;
     }
-    
+
     /** Create a media type from type and subType */
-    public MediaType(String type, String subType)
-    {
+    public MediaType(String type, String subType) {
         this(type, subType, null) ;
     }
 
     /** Create a media type from type and subType */
-    public MediaType(String type, String subType, String charset)
-    {
+    public MediaType(String type, String subType, String charset) {
         this.type = type ;
         this.subType = subType ;
         this.params = new LinkedHashMap<String, String>() ;
@@ -73,63 +75,56 @@ public class MediaType
             setParameter(strCharset, charset) ;
     }
 
-    public static MediaType create(String contentType, String charset)
-    {
+    public static MediaType create(String contentType, String charset) {
         ParsedMediaType mediaType = parse(contentType) ;
-        mediaType.params.put(strCharset, charset) ;
+        if ( charset != null )
+            mediaType.params.put(strCharset, charset) ;
         return new MediaType(mediaType) ;
     }
-    
-    public static MediaType createFromContentType(String string)
-    {
+
+    public static MediaType createFromContentType(String string) {
         return new MediaType(parse(string)) ;
     }
 
-    public static MediaType create(String contentType, String subType, String charset)
-    {
+    public static MediaType create(String contentType, String subType, String charset) {
         return new MediaType(contentType, subType, charset) ;
     }
-    
-    public static MediaType create(String string)
-    {
+
+    public static MediaType create(String string) {
         if ( string == null )
             return null ;
         return new MediaType(parse(string)) ;
     }
-    
-    public static ParsedMediaType parse(String string)
-    {
+
+    public static ParsedMediaType parse(String string) {
         ParsedMediaType mt = new ParsedMediaType() ;
-        
+
         String[] x = WebLib.split(string, ";") ;
         String[] t = WebLib.split(x[0], "/") ;
         mt.type = t[0] ;
         if ( t.length > 1 )
             mt.subType = t[1] ;
-        
-        for ( int i = 1 ; i < x.length ; i++ )
-        {
+
+        for (int i = 1; i < x.length; i++) {
             // Each a parameter
             String z[] = WebLib.split(x[i], "=") ;
             if ( z.length == 2 )
                 mt.params.put(z[0], z[1]) ;
             else
-                log.warn("Duff parameter: "+x[i]+" in "+string) ;
+                log.warn("Duff parameter: " + x[i] + " in " + string) ;
         }
         return mt ;
     }
-    
+
     /** Format for use in HTTP header */
-    
-    public String toHeaderString()
-    {
+
+    public String toHeaderString() {
         StringBuilder b = new StringBuilder() ;
         b.append(type) ;
         if ( subType != null )
             b.append("/").append(subType) ;
 
-        for ( Map.Entry<String, String> entry: params.entrySet() )
-        {
+        for (Map.Entry<String, String> entry : params.entrySet()) {
             b.append(";") ;
             b.append(entry.getKey()) ;
             b.append("=") ;
@@ -137,22 +132,22 @@ public class MediaType
         }
         return b.toString() ;
     }
-    
-    /** Format to show structure - intentionally different from header
-     *  form so you can tell parsing happened correctly
-     */  
-    
+
+    /**
+     * Format to show structure - intentionally different from header form so
+     * you can tell parsing happened correctly
+     */
+
     @Override
-    public String toString()
-    {
+    public String toString() {
         StringBuffer b = new StringBuffer() ;
         b.append("[") ;
         b.append(type) ;
         if ( subType != null )
             b.append("/").append(subType) ;
-        for ( Iterator<String> iter = params.keySet().iterator() ; iter.hasNext() ; )
-        {
-            String k = iter.next() ;
+        for (String k : params.keySet()) {
+            if ( k.equals("boundary") )
+                continue ;
             String v = params.get(k) ;
             b.append(" ") ;
             b.append(k) ;
@@ -162,55 +157,72 @@ public class MediaType
         b.append("]") ;
         return b.toString() ;
     }
-    
-//    private String type = null ;
-//    private String subType = null ;
-//    // Keys in insertion order.
-//    private Map<String, String> params = new LinkedHashMap<String, String>() ;
-    
+
+    // private String type = null ;
+    // private String subType = null ;
+    // // Keys in insertion order.
+    // private Map<String, String> params = new LinkedHashMap<String, String>()
+    // ;
+
     @Override
-    public int hashCode() 
-    {
-        return hashCodeObject(type, 1)^hashCodeObject(subType, 2)^hashCodeObject(params, 3) ;
+    public int hashCode() {
+        return hashCodeObject(type, 1) ^ hashCodeObject(subType, 2) ^ hashCodeObject(params, 3) ;
     }
-    
+
     @Override
-    public boolean equals(Object object) 
-    {
-        if (this == object) return true ;
-        if (!(object instanceof MediaType)) return false ;
+    public boolean equals(Object object) {
+        if ( this == object )
+            return true ;
+        if ( !(object instanceof MediaType) )
+            return false ;
         MediaType mt = (MediaType)object ;
         return equal(type, mt.type) && equal(subType, mt.subType) && equal(params, mt.params) ;
     }
 
-    public String getParameter(String name)             { return params.get(name) ; }
-    private void setParameter(String name, String value) { params.put(name, value) ; strContentType = null ; }
+    public String getParameter(String name) {
+        return params.get(name) ;
+    }
+
+    private void setParameter(String name, String value) {
+        params.put(name, value) ;
+        strContentType = null ;
+    }
 
     // A cache.
     private String strContentType = null ;
-    public String getContentType()
-    {
+
+    public String getContentType() {
         if ( strContentType != null )
             return strContentType ;
         if ( subType == null )
             return type ;
-        return type+"/"+subType ;
+        return type + "/" + subType ;
+    }
+
+    public String getCharset() {
+        return getParameter(strCharset) ;
+    }
+
+    public String getSubType() {
+        return subType ;
+    }
+
+    // public void setSubType(String subType) { this.subType = subType ;
+    // strContentType = null ; }
+    public String getType() {
+        return type ;
     }
-    
-    public String getCharset()              { return getParameter(strCharset) ; }
+    // public void setType(String type) { this.type = type ; strContentType =
+    // null ; }
 
-    public String getSubType()              { return subType ; }
-//    public void setSubType(String subType)  { this.subType = subType ; strContentType = null ; }
-    public String getType()                 { return type ; }
-//    public void setType(String type)        { this.type = type ; strContentType = null ; }
-    
-    /** The outcome of parsing 
-     * @see MediaType#parse 
+    /**
+     * The outcome of parsing
+     * 
+     * @see MediaType#parse
      */
-    /*package*/ static class ParsedMediaType
-    {
-        public String type ;
-        public String subType ;
+    /* package */static class ParsedMediaType {
+        public String              type ;
+        public String              subType ;
         public Map<String, String> params = new LinkedHashMap<String, String>() ;
     }
 }

Modified: jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/FusekiCmd.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/FusekiCmd.java (original)
+++ jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/FusekiCmd.java Sun Dec 15 17:02:19 2013
@@ -28,7 +28,7 @@ import org.apache.jena.atlas.io.IO ;
 import org.apache.jena.atlas.lib.FileOps ;
 import org.apache.jena.atlas.lib.Lib ;
 import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import org.apache.jena.fuseki.mgt.ManagementServer ;
 import org.apache.jena.fuseki.server.FusekiConfig ;
 import org.apache.jena.fuseki.server.SPARQLServer ;
@@ -111,7 +111,7 @@ public class FusekiCmd extends CmdARQ
             return ;
         }
         // Use built-in for Fuseki.
-        Log.resetLogging(log4Jsetup) ;     
+        LogCtl.resetLogging(log4Jsetup) ;     
     }
     
     static { setLogging() ; }

Modified: jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java (original)
+++ jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java Sun Dec 15 17:02:19 2013
@@ -19,7 +19,7 @@
 package org.apache.jena.fuseki;
 
 import org.apache.http.client.HttpClient ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import org.apache.jena.fuseki.http.TestDatasetAccessorHTTP ;
 import org.apache.jena.fuseki.http.TestDatasetGraphAccessorHTTP ;
 import org.apache.jena.fuseki.http.TestHttpOp ;
@@ -29,7 +29,6 @@ import org.junit.BeforeClass ;
 import org.junit.runner.RunWith ;
 import org.junit.runners.Suite ;
 
-
 @RunWith(Suite.class)
 @Suite.SuiteClasses( {
     TestHttpOp.class
@@ -57,6 +56,6 @@ public class TS_Fuseki extends ServerTes
         HttpOp.setDefaultHttpClient(defaultHttpClient) ;
     }
     
-    @BeforeClass static public void beforeClass() { Log.disable(Fuseki.requestLogName) ; }
-    @AfterClass static public void afterClass()   { Log.setInfo(Fuseki.requestLogName) ;}
+    @BeforeClass static public void beforeClass() { LogCtl.disable(Fuseki.requestLogName) ; }
+    @AfterClass static public void afterClass()   { LogCtl.setInfo(Fuseki.requestLogName) ;}
 }

Modified: jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/TestAuth.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/TestAuth.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/TestAuth.java (original)
+++ jena/trunk/jena-fuseki/src/test/java/org/apache/jena/fuseki/TestAuth.java Sun Dec 15 17:02:19 2013
@@ -26,7 +26,7 @@ import java.net.URISyntaxException ;
 import java.util.HashMap ;
 import java.util.Map ;
 
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import org.apache.jena.atlas.web.HttpException ;
 import org.apache.jena.atlas.web.auth.PreemptiveBasicAuthenticator ;
 import org.apache.jena.atlas.web.auth.ScopedAuthenticator ;
@@ -77,9 +77,9 @@ public class TestAuth extends ServerTest
         writer.write("forbidden: password, other");
         writer.close();
 
-        Log.logLevel(Fuseki.serverLog.getName(), org.apache.log4j.Level.WARN, java.util.logging.Level.WARNING);
-        Log.logLevel(Fuseki.requestLog.getName(), org.apache.log4j.Level.WARN, java.util.logging.Level.WARNING);
-        Log.logLevel("org.eclipse.jetty", org.apache.log4j.Level.WARN, java.util.logging.Level.WARNING);
+        LogCtl.logLevel(Fuseki.serverLog.getName(), org.apache.log4j.Level.WARN, java.util.logging.Level.WARNING);
+        LogCtl.logLevel(Fuseki.requestLog.getName(), org.apache.log4j.Level.WARN, java.util.logging.Level.WARNING);
+        LogCtl.logLevel("org.eclipse.jetty", org.apache.log4j.Level.WARN, java.util.logging.Level.WARNING);
 
         DatasetGraph dsg = DatasetGraphFactory.createMem();
         // This must agree with ServerTest

Modified: jena/trunk/jena-spatial/src/main/java/examples/JenaSpatialExample1.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-spatial/src/main/java/examples/JenaSpatialExample1.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-spatial/src/main/java/examples/JenaSpatialExample1.java (original)
+++ jena/trunk/jena-spatial/src/main/java/examples/JenaSpatialExample1.java Sun Dec 15 17:02:19 2013
@@ -22,7 +22,7 @@ import java.io.File ;
 import java.io.IOException ;
 
 import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import org.apache.jena.query.spatial.* ;
 import org.apache.jena.riot.RDFDataMgr ;
 import org.apache.lucene.store.Directory ;
@@ -39,7 +39,7 @@ import com.hp.hpl.jena.tdb.TDBFactory ;
 /** Build a spatial search dataset */
 public class JenaSpatialExample1 {
 	static {
-		Log.setLog4j();
+		LogCtl.setLog4j();
 	}
 	static Logger log = LoggerFactory.getLogger("JenaSpatialExample");
 	

Modified: jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdIndexBuild.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdIndexBuild.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdIndexBuild.java (original)
+++ jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdIndexBuild.java Sun Dec 15 17:02:19 2013
@@ -24,7 +24,7 @@ import java.util.Iterator ;
 import org.apache.jena.atlas.AtlasException ;
 import org.apache.jena.atlas.io.IO ;
 import org.apache.jena.atlas.lib.ColumnMap ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import tdb.cmdline.CmdTDB ;
 
 import com.hp.hpl.jena.tdb.base.block.BlockMgr ;
@@ -42,7 +42,7 @@ import com.hp.hpl.jena.tdb.sys.SystemTDB
 /** From a file of records, build a (packed) index */ 
 public class CmdIndexBuild
 {
-    static { Log.setLog4j() ; }
+    static { LogCtl.setLog4j() ; }
     
     public static void main(String...argv)
     {

Modified: jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdIndexCopy.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdIndexCopy.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdIndexCopy.java (original)
+++ jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdIndexCopy.java Sun Dec 15 17:02:19 2013
@@ -24,7 +24,7 @@ import java.util.Iterator ;
 
 import org.apache.jena.atlas.lib.Bytes ;
 import org.apache.jena.atlas.lib.Tuple ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import org.apache.jena.atlas.logging.ProgressLogger ;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
@@ -41,7 +41,7 @@ import com.hp.hpl.jena.tdb.sys.SystemTDB
 /** Copy one index to another, probably with a different key order */
 public class CmdIndexCopy
 {
-    static { Log.setLog4j() ; }
+    static { LogCtl.setLog4j() ; }
     private static Logger log = LoggerFactory.getLogger(CmdIndexCopy.class) ;
     
     static long tickQuantum = 100*1000 ;

Modified: jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdNodeTableBuilder.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdNodeTableBuilder.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdNodeTableBuilder.java (original)
+++ jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/store/bulkloader2/CmdNodeTableBuilder.java Sun Dec 15 17:02:19 2013
@@ -31,7 +31,7 @@ import org.apache.jena.atlas.io.IO ;
 import org.apache.jena.atlas.lib.FileOps ;
 import org.apache.jena.atlas.lib.Lib ;
 import org.apache.jena.atlas.lib.Tuple ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import org.apache.jena.atlas.logging.ProgressLogger ;
 import org.apache.jena.riot.Lang ;
 import org.apache.jena.riot.RDFLanguages ;
@@ -63,7 +63,7 @@ import com.hp.hpl.jena.tdb.sys.Names ;
 /** Build node table - write triples/quads as text file */
 public class CmdNodeTableBuilder extends CmdGeneral
 {
-    static { Log.setLog4j() ; }
+    static { LogCtl.setLog4j() ; }
     private static Logger cmdLog =TDB.logLoader ;
 
     private static ArgDecl argLocation = new ArgDecl(ArgDecl.HasValue, "loc", "location") ;

Modified: jena/trunk/jena-tdb/src/main/java/tdb/cmdline/CmdTDB.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/tdb/cmdline/CmdTDB.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/tdb/cmdline/CmdTDB.java (original)
+++ jena/trunk/jena-tdb/src/main/java/tdb/cmdline/CmdTDB.java Sun Dec 15 17:02:19 2013
@@ -18,7 +18,7 @@
 
 package tdb.cmdline;
 
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import arq.cmdline.CmdARQ ;
 
 import com.hp.hpl.jena.Jena ;
@@ -52,7 +52,7 @@ public abstract class CmdTDB extends Cmd
             return ;
         // attempt once.
         initialized = true ;
-        Log.setCmdLogging() ;
+        LogCtl.setCmdLogging() ;
         TDB.init() ;
         DatasetBuilderStd.setOptimizerWarningFlag(false) ;
     }

Modified: jena/trunk/jena-tdb/src/main/java/tdb/tdbreorder.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/tdb/tdbreorder.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/tdb/tdbreorder.java (original)
+++ jena/trunk/jena-tdb/src/main/java/tdb/tdbreorder.java Sun Dec 15 17:02:19 2013
@@ -20,7 +20,7 @@ package tdb;
 
 import org.apache.jena.atlas.io.IndentedWriter ;
 import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 
 import com.hp.hpl.jena.graph.Triple ;
 import com.hp.hpl.jena.shared.PrefixMapping ;
@@ -45,8 +45,8 @@ public class tdbreorder
             System.err.println("Usage: PATTERN STATS") ;
             System.exit(1) ;
         }
-        Log.enable(StatsMatcher.class) ;
-        Log.enable(ReorderTransformationSubstitution.class) ;
+        LogCtl.enable(StatsMatcher.class) ;
+        LogCtl.enable(ReorderTransformationSubstitution.class) ;
         
         if ( args.length != 2 )
         {

Modified: jena/trunk/jena-tdb/src/main/java/tdb/tools/dumpbpt.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/tdb/tools/dumpbpt.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/tdb/tools/dumpbpt.java (original)
+++ jena/trunk/jena-tdb/src/main/java/tdb/tools/dumpbpt.java Sun Dec 15 17:02:19 2013
@@ -25,7 +25,7 @@ import java.util.List ;
 
 import org.apache.jena.atlas.lib.ColumnMap ;
 import org.apache.jena.atlas.lib.Tuple ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import tdb.cmdline.ModLocation ;
 import arq.cmdline.CmdGeneral ;
 
@@ -48,7 +48,7 @@ public class dumpbpt extends CmdGeneral
     
     static public void main(String... argv)
     { 
-        Log.setLog4j() ;
+        LogCtl.setLog4j() ;
         new dumpbpt(argv).mainRun() ;
     }
 

Modified: jena/trunk/jena-tdb/src/main/java/tdb/tools/dumpnodetable.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/tdb/tools/dumpnodetable.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/tdb/tools/dumpnodetable.java (original)
+++ jena/trunk/jena-tdb/src/main/java/tdb/tools/dumpnodetable.java Sun Dec 15 17:02:19 2013
@@ -26,6 +26,7 @@ import java.util.List ;
 import org.apache.jena.atlas.io.IndentedWriter ;
 import org.apache.jena.atlas.lib.Pair ;
 import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import tdb.cmdline.ModLocation ;
 import arq.cmdline.CmdGeneral ;
 
@@ -48,7 +49,7 @@ public class dumpnodetable extends CmdGe
     
     static public void main(String... argv)
     { 
-        Log.setLog4j() ;
+        LogCtl.setLog4j() ;
         new dumpnodetable(argv).mainRun() ;
     }
 

Modified: jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/base/block/TestBlockMgrMapped.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/base/block/TestBlockMgrMapped.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/base/block/TestBlockMgrMapped.java (original)
+++ jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/base/block/TestBlockMgrMapped.java Sun Dec 15 17:02:19 2013
@@ -19,7 +19,7 @@
 package com.hp.hpl.jena.tdb.base.block;
 
 import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import org.junit.After ;
 import org.junit.AfterClass ;
 import org.junit.BeforeClass ;
@@ -32,7 +32,7 @@ public class TestBlockMgrMapped extends 
 {
     static boolean logging = false ;
     
-    static { if ( logging ) Log.setLog4j() ; }
+    static { if ( logging ) LogCtl.setLog4j() ; }
     
     static final String filename = ConfigTest.getTestingDir()+"/block-mgr" ;
     

Modified: jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_QuadsObjectIsNull.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_QuadsObjectIsNull.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_QuadsObjectIsNull.java (original)
+++ jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_QuadsObjectIsNull.java Sun Dec 15 17:02:19 2013
@@ -21,7 +21,7 @@ package com.hp.hpl.jena.tdb.extra ;
 import java.util.Iterator ;
 
 import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 
 import com.hp.hpl.jena.query.ReadWrite ;
 import com.hp.hpl.jena.sparql.core.Quad ;
@@ -47,10 +47,10 @@ public class T_QuadsObjectIsNull {
 
 	    if ( false )
 	    {
-    	    Log.enable(SystemTDB.syslog.getName()) ;
-    	    Log.enable(Journal.class) ;
-    	    Log.enable(JournalControl.class) ;
-    	    Log.enable(NodeTableTrans.class) ;
+    	    LogCtl.enable(SystemTDB.syslog.getName()) ;
+    	    LogCtl.enable(Journal.class) ;
+    	    LogCtl.enable(JournalControl.class) ;
+    	    LogCtl.enable(NodeTableTrans.class) ;
 	    }
 	    if ( false )
 	    {

Modified: jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TDBWriteTransaction.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TDBWriteTransaction.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TDBWriteTransaction.java (original)
+++ jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TDBWriteTransaction.java Sun Dec 15 17:02:19 2013
@@ -33,7 +33,7 @@ import java.util.ArrayList ;
 import java.util.List ;
 
 import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 
 import com.hp.hpl.jena.query.Dataset ;
 import com.hp.hpl.jena.query.ReadWrite ;
@@ -63,7 +63,7 @@ public class T_TDBWriteTransaction {
         if ( true )
             SystemTDB.setFileMode(FileMode.direct) ;
 
-        Log.setLog4j() ;
+        LogCtl.setLog4j() ;
 	    TransactionManager.QueueBatchSize = 10;
 	    
 //		if (args.length == 0) {

Modified: jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TransSystem.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TransSystem.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TransSystem.java (original)
+++ jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TransSystem.java Sun Dec 15 17:02:19 2013
@@ -58,7 +58,7 @@ import com.hp.hpl.jena.tdb.transaction.T
 /** System testing of the transactions. */
 public class T_TransSystem
 {
-    static { org.apache.jena.atlas.logging.Log.setLog4j() ; }
+    static { org.apache.jena.atlas.logging.LogCtl.setLog4j() ; }
     private static Logger log = LoggerFactory.getLogger(T_TransSystem.class) ;
 
     /* Notes:

Modified: jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TransSystemMultiDatasets.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TransSystemMultiDatasets.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TransSystemMultiDatasets.java (original)
+++ jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TransSystemMultiDatasets.java Sun Dec 15 17:02:19 2013
@@ -61,7 +61,7 @@ public class T_TransSystemMultiDatasets
 {
     // Use this to flip between FileMode.direct and FileMode.mapped
     static { SystemTDB.setFileMode(FileMode.mapped) ; }
-    static { org.apache.jena.atlas.logging.Log.setLog4j() ; }
+    static { org.apache.jena.atlas.logging.LogCtl.setLog4j() ; }
     private static Logger log = LoggerFactory.getLogger(T_TransSystemMultiDatasets.class) ;
 
     static boolean MEM = false ;

Modified: jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TxnDeadlockTest.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TxnDeadlockTest.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TxnDeadlockTest.java (original)
+++ jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/extra/T_TxnDeadlockTest.java Sun Dec 15 17:02:19 2013
@@ -25,7 +25,7 @@ import java.util.concurrent.ExecutorServ
 import java.util.concurrent.Executors ;
 import java.util.concurrent.atomic.AtomicInteger ;
 
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 
 import com.hp.hpl.jena.graph.Node ;
 import com.hp.hpl.jena.graph.NodeFactory ;
@@ -39,9 +39,9 @@ import com.hp.hpl.jena.tdb.transaction.T
 public class T_TxnDeadlockTest {
 
     static { 
-        Log.setLog4j() ; 
+        LogCtl.setLog4j() ; 
         //Log.enable("TDB") ;
-        if ( false ) Log.enable(TransactionManager.class) ;
+        if ( false ) LogCtl.enable(TransactionManager.class) ;
         //Log.enable(LockMRSW.class) ;
     }
     

Modified: jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/bplustree/CmdTestBPlusTreeRewriter.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/bplustree/CmdTestBPlusTreeRewriter.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/bplustree/CmdTestBPlusTreeRewriter.java (original)
+++ jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/index/bplustree/CmdTestBPlusTreeRewriter.java Sun Dec 15 17:02:19 2013
@@ -19,7 +19,7 @@
 package com.hp.hpl.jena.tdb.index.bplustree;
 
 import org.apache.jena.atlas.lib.RandomLib ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 
 import com.hp.hpl.jena.sparql.util.Utils ;
 import com.hp.hpl.jena.tdb.base.record.RecordFactory ;
@@ -27,7 +27,7 @@ import com.hp.hpl.jena.tdb.sys.SystemTDB
 
 public class CmdTestBPlusTreeRewriter
 {
-    static { Log.setLog4j() ; }
+    static { LogCtl.setLog4j() ; }
     
     public static void main(String...argv)
     {

Modified: jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TestLoader.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TestLoader.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TestLoader.java (original)
+++ jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/store/TestLoader.java Sun Dec 15 17:02:19 2013
@@ -24,7 +24,7 @@ import java.util.List ;
 import org.apache.jena.atlas.io.IO ;
 import org.apache.jena.atlas.iterator.Iter ;
 import org.apache.jena.atlas.junit.BaseTest ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import org.junit.AfterClass ;
 import org.junit.BeforeClass ;
 import org.junit.Test ;
@@ -50,14 +50,14 @@ public class TestLoader extends BaseTest
     @BeforeClass
     static public void beforeClass() {
         DIR = ConfigTest.getTestingDataRoot()+"/Loader/" ;
-        Log.disable(ARQ.logExecName) ;
-        Log.disable(TDB.logLoaderName) ;
+        LogCtl.disable(ARQ.logExecName) ;
+        LogCtl.disable(TDB.logLoaderName) ;
     }
 
     @AfterClass
     static public void afterClass() {
-        Log.enable(ARQ.logExecName) ;
-        Log.enable(TDB.logLoaderName) ;
+        LogCtl.enable(ARQ.logExecName) ;
+        LogCtl.enable(TDB.logLoaderName) ;
     }
 
     static DatasetGraphTDB fresh() {

Modified: jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/transaction/AbstractTestTransSeq.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/transaction/AbstractTestTransSeq.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/transaction/AbstractTestTransSeq.java (original)
+++ jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/transaction/AbstractTestTransSeq.java Sun Dec 15 17:02:19 2013
@@ -20,7 +20,7 @@ package com.hp.hpl.jena.tdb.transaction;
 
 
 import org.apache.jena.atlas.junit.BaseTest ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import org.junit.AfterClass ;
 import org.junit.BeforeClass ;
 import org.junit.Test ;
@@ -37,8 +37,8 @@ import com.hp.hpl.jena.tdb.sys.SystemTDB
 /** Basic tests and tests of ordering (single thread) */
 public abstract class AbstractTestTransSeq extends BaseTest
 {
-    @BeforeClass public static void beforeClassLoggingOff() { Log.disable(SystemTDB.errlog.getName()) ; } 
-    @AfterClass public static void afterClassLoggingOn()    { Log.enable(SystemTDB.errlog.getName(), "info") ; }
+    @BeforeClass public static void beforeClassLoggingOff() { LogCtl.disable(SystemTDB.errlog.getName()) ; } 
+    @AfterClass public static void afterClassLoggingOn()    { LogCtl.setInfo(SystemTDB.errlog.getName()) ; }
     
     // Per test unique-ish.
     long x = System.currentTimeMillis() ;

Modified: jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/transaction/TestTransactionTDB.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/transaction/TestTransactionTDB.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/transaction/TestTransactionTDB.java (original)
+++ jena/trunk/jena-tdb/src/test/java/com/hp/hpl/jena/tdb/transaction/TestTransactionTDB.java Sun Dec 15 17:02:19 2013
@@ -21,7 +21,7 @@ package com.hp.hpl.jena.tdb.transaction;
 import static com.hp.hpl.jena.query.ReadWrite.READ ;
 import static com.hp.hpl.jena.query.ReadWrite.WRITE ;
 import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import org.junit.* ;
 
 import com.hp.hpl.jena.graph.Triple ;
@@ -39,8 +39,8 @@ public class TestTransactionTDB extends 
     static boolean nonDeleteableMMapFiles = SystemTDB.isWindows ;
     String DIR = null ; 
     
-    @BeforeClass public static void beforeClassLoggingOff() { Log.disable(SystemTDB.errlog.getName()) ; } 
-    @AfterClass public static void afterClassLoggingOn()    { Log.enable(SystemTDB.errlog.getName(), "info") ; }
+    @BeforeClass public static void beforeClassLoggingOff() { LogCtl.disable(SystemTDB.errlog.getName()) ; } 
+    @AfterClass public static void afterClassLoggingOn()    { LogCtl.setInfo(SystemTDB.errlog.getName()) ; }
     
     @Before public void before()
     {

Modified: jena/trunk/jena-text/src/main/java/examples/JenaTextExample1.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-text/src/main/java/examples/JenaTextExample1.java?rev=1551030&r1=1551029&r2=1551030&view=diff
==============================================================================
--- jena/trunk/jena-text/src/main/java/examples/JenaTextExample1.java (original)
+++ jena/trunk/jena-text/src/main/java/examples/JenaTextExample1.java Sun Dec 15 17:02:19 2013
@@ -19,7 +19,7 @@
 package examples;
 
 import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.atlas.logging.LogCtl ;
 import org.apache.jena.query.text.EntityDefinition ;
 import org.apache.jena.query.text.TextDatasetFactory ;
 import org.apache.jena.query.text.TextQuery ;
@@ -37,7 +37,7 @@ import com.hp.hpl.jena.vocabulary.RDFS ;
 /** Build a text search dataset */
 public class JenaTextExample1
 {
-    static { Log.setLog4j() ; }
+    static { LogCtl.setLog4j() ; }
     static Logger log = LoggerFactory.getLogger("JenaTextExample") ;
     
     public static void main(String ... argv)



Mime
View raw message