LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SVN Archives


HPS-SVN Archives

HPS-SVN Archives


HPS-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

HPS-SVN Home

HPS-SVN Home

HPS-SVN  October 2015

HPS-SVN October 2015

Subject:

r3820 - in /java/trunk: logging/src/main/java/org/hps/logging/config/TestLoggingConfig.java logging/src/main/resources/org/hps/logging/config/test_logging.properties parent/pom.xml

From:

[log in to unmask]

Reply-To:

Notification of commits to the hps svn repository <[log in to unmask]>

Date:

Fri, 9 Oct 2015 05:10:52 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (139 lines)

Author: [log in to unmask]
Date: Thu Oct  8 22:10:50 2015
New Revision: 3820

Log:
Add logging config which suppresses output for tests.

Added:
    java/trunk/logging/src/main/java/org/hps/logging/config/TestLoggingConfig.java
    java/trunk/logging/src/main/resources/org/hps/logging/config/test_logging.properties
Modified:
    java/trunk/parent/pom.xml

Added: java/trunk/logging/src/main/java/org/hps/logging/config/TestLoggingConfig.java
 =============================================================================
--- java/trunk/logging/src/main/java/org/hps/logging/config/TestLoggingConfig.java	(added)
+++ java/trunk/logging/src/main/java/org/hps/logging/config/TestLoggingConfig.java	Thu Oct  8 22:10:50 2015
@@ -0,0 +1,27 @@
+package org.hps.logging.config;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.logging.LogManager;
+
+/**
+ * Read the test logging configuration and load it into the global log manager.
+ * <p>
+ * This configuration will cause only warnings and errors to print.
+ * 
+ * @author Jeremy McCormick, SLAC
+ */
+public class TestLoggingConfig {
+
+    /**
+     * Class constructor which reads in a logging properties file from a classpath resource.
+     */
+    public TestLoggingConfig() {
+        InputStream inputStream = TestLoggingConfig.class.getResourceAsStream("test_logging.properties");
+        try {
+            LogManager.getLogManager().readConfiguration(inputStream);
+        } catch (SecurityException | IOException e) {
+            throw new RuntimeException("Initialization of test logging configuration failed.", e);
+        }
+    }
+}

Added: java/trunk/logging/src/main/resources/org/hps/logging/config/test_logging.properties
 =============================================================================
--- java/trunk/logging/src/main/resources/org/hps/logging/config/test_logging.properties	(added)
+++ java/trunk/logging/src/main/resources/org/hps/logging/config/test_logging.properties	Thu Oct  8 22:10:50 2015
@@ -0,0 +1,73 @@
+#
+# Global logging configuration for HPS Java packages.
+#
+# Jeremy McCormick, SLAC
+#
+
+# default global level
+.level = WARNING
+
+# default handler which prints to console
+handlers = java.util.logging.ConsoleHandler
+
+# prints timestamp (1$), level (4$), source ($2), message (5$), and (optionally) an exception (6$).
+java.util.logging.SimpleFormatter.format = %1$tc [%4$s] %2$s :: %5$s%6$s%n
+
+# configure the console handler
+java.util.logging.ConsoleHandler.level = ALL
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+f
+# lcsim job
+org.lcsim.job.level = WARNING
+org.lcsim.job.EventMarkerDriver.level = OFF
+
+# conditions
+org.hps.conditions.api.level = WARNING
+org.hps.conditions.database.level = WARNING
+org.hps.conditions.cli.level = WARNING
+org.hps.conditions.ecal.level = WARNING
+org.hps.conditions.svt.level = WARNING
+
+# monitoring-drivers
+org.hps.monitoring.drivers.svt.level = WARNING
+org.hps.monitoring.plotting.level = WARNING
+
+# evio
+org.hps.evio.level = WARNING
+
+# analysis
+org.hps.analysis.trigger.level = WARNING
+org.hps.analysis.dataquality.level = WARNING
+
+# crawler
+org.hps.crawler.level = WARNING
+
+# ecal-recon
+org.hps.recon.ecal.level = WARNING
+org.hps.recon.ecal.cluster.level = WARNING
+
+# recon
+org.hps.recon.filtering.level = WARNING
+
+# record-util
+org.hps.record.epics.level = WARNING
+org.hps.record.evio.level = WARNING
+org.hps.record.scalers.level = WARNING
+org.hps.record.triggerbank.level = WARNING
+org.hps.record.svt.level = WARNING
+
+# tracking
+org.hps.recon.tracking.level = WARNING
+org.hps.recon.tracking.gbl.level = WARNING
+
+# run-database
+org.hps.run.database.level = WARNING
+
+# monitoring-application
+org.hps.monitoring.application.model.level = WARNING
+org.hps.monitoring.application.level = WARNING
+
+# detector-model
+org.lcsim.detector.converter.compact.level = WARNING
+org.lcsim.geometry.compact.converter.level = WARNING
+org.hps.detector.svt.level = WARNING

Modified: java/trunk/parent/pom.xml
 =============================================================================
--- java/trunk/parent/pom.xml	(original)
+++ java/trunk/parent/pom.xml	Thu Oct  8 22:10:50 2015
@@ -442,7 +442,7 @@
                     <forkMode>pertest</forkMode>
                     <systemPropertyVariables>                    
                         <org.lcsim.cacheDir>${org.lcsim.cacheDir}</org.lcsim.cacheDir>
-                        <java.util.logging.config.class>org.hps.logging.config.DefaultLoggingConfig</java.util.logging.config.class>
+                        <java.util.logging.config.class>org.hps.logging.config.TestLoggingConfig</java.util.logging.config.class>
                     </systemPropertyVariables>
                 </configuration>
             </plugin>

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

November 2017
August 2017
July 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use