perfsonar-dev - [pS-dev] [GEANT/SA2/ps-java-services] r5968 - in trunk/perfsonar-java-base2: . src/main/java/org/perfsonar/base2/service/authn src/main/java/org/perfsonar/base2/service/authn/tokens src/main/java/org/perfsonar/base2/service/axis2interface src/main/java/org/perfsonar/base2/service/configuration src/main/java/org/perfsonar/base2/service/configuration/migration src/main/java/org/perfsonar/base2/service/messages src/main/java/org/perfsonar/base2/service/registration src/main/java/org/perfsonar/base2/service/requesthandler src/main/java/org/perfsonar/base2/service/requesthandler/axis2 src/main/java/org/perfsonar/base2/service/scheduler src/main/java/org/perfsonar/base2/service/scheduler/singleThread src/main/java/org/perfsonar/base2/servlets src/main/java/org/perfsonar/service/simpleservice src/main/java/org/perfsonar/test
Subject: perfsonar development work
List archive
[pS-dev] [GEANT/SA2/ps-java-services] r5968 - in trunk/perfsonar-java-base2: . src/main/java/org/perfsonar/base2/service/authn src/main/java/org/perfsonar/base2/service/authn/tokens src/main/java/org/perfsonar/base2/service/axis2interface src/main/java/org/perfsonar/base2/service/configuration src/main/java/org/perfsonar/base2/service/configuration/migration src/main/java/org/perfsonar/base2/service/messages src/main/java/org/perfsonar/base2/service/registration src/main/java/org/perfsonar/base2/service/requesthandler src/main/java/org/perfsonar/base2/service/requesthandler/axis2 src/main/java/org/perfsonar/base2/service/scheduler src/main/java/org/perfsonar/base2/service/scheduler/singleThread src/main/java/org/perfsonar/base2/servlets src/main/java/org/perfsonar/service/simpleservice src/main/java/org/perfsonar/test
Chronological Thread
- From:
- To:
- Subject: [pS-dev] [GEANT/SA2/ps-java-services] r5968 - in trunk/perfsonar-java-base2: . src/main/java/org/perfsonar/base2/service/authn src/main/java/org/perfsonar/base2/service/authn/tokens src/main/java/org/perfsonar/base2/service/axis2interface src/main/java/org/perfsonar/base2/service/configuration src/main/java/org/perfsonar/base2/service/configuration/migration src/main/java/org/perfsonar/base2/service/messages src/main/java/org/perfsonar/base2/service/registration src/main/java/org/perfsonar/base2/service/requesthandler src/main/java/org/perfsonar/base2/service/requesthandler/axis2 src/main/java/org/perfsonar/base2/service/scheduler src/main/java/org/perfsonar/base2/service/scheduler/singleThread src/main/java/org/perfsonar/base2/servlets src/main/java/org/perfsonar/service/simpleservice src/main/java/org/perfsonar/test
- Date: Tue, 21 Aug 2012 11:48:08 +0100 (BST)
Author: nordunet.behrmann
Date: 2012-08-21 11:48:08 +0100 (Tue, 21 Aug 2012)
New Revision: 5968
Modified:
trunk/perfsonar-java-base2/pom.xml
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/authn/AADispatchSOAPProtocol.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/authn/tokens/SecTokenSOAPManager.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/axis2interface/PerfsonarService.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/ConfigurationManager.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/OptionEntry.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/migration/MigratorComponent.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/messages/GenericMessageHandler.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/AbstractRegistrationAction.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/DumbRegisterDataSource.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/GenericLSRegistrator.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/LSRegistrationAction.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/MetadataExistDBRegisterDataSource.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/requesthandler/EchoServiceEngine.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/requesthandler/RequestHandler.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/requesthandler/axis2/Axis2RequestHandler.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/SchedulerTask.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/SimpleAction.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/SimpleScheduler.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/singleThread/SingleThreadScheduler.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/servlets/AuthServlet.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/servlets/ExistDBInitServlet.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/service/simpleservice/SimpleServiceServiceEngine.java
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/test/StaxParserSimple.java
Log:
perfsonar-java-base2: Use slf4j API
Rather than calling the log4j API directly, this patch updates the
code to use slf4j. This decouples the code from the logging library.
Modified: trunk/perfsonar-java-base2/pom.xml
===================================================================
--- trunk/perfsonar-java-base2/pom.xml 2012-08-21 10:48:07 UTC (rev 5967)
+++ trunk/perfsonar-java-base2/pom.xml 2012-08-21 10:48:08 UTC (rev 5968)
@@ -238,7 +238,12 @@
<version>3.0</version>
</dependency>
- <dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.6.4</version>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/authn/AADispatchSOAPProtocol.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/authn/AADispatchSOAPProtocol.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/authn/AADispatchSOAPProtocol.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -18,7 +18,8 @@
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.ws.security.WSConstants;
import org.opensaml.SAMLAssertion;
import org.perfsonar.base2.client.authn.AttrEERequestGenerator;
@@ -42,7 +43,7 @@
private String asPoint;
- protected static final Logger logger =
Logger.getLogger(AADispatchSOAPProtocol.class.getName());
+ protected static final Logger logger =
LoggerFactory.getLogger(AADispatchSOAPProtocol.class);
public AADispatchSOAPProtocol() throws PerfSONARException {
this.asPoint = "";
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/authn/tokens/SecTokenSOAPManager.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/authn/tokens/SecTokenSOAPManager.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/authn/tokens/SecTokenSOAPManager.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -27,7 +27,8 @@
import org.apache.axiom.soap.SOAPHeader;
import org.apache.axiom.soap.SOAPHeaderBlock;
import org.apache.axis2.context.MessageContext;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.rampart.util.Axis2Util;
import org.apache.ws.security.WSSecurityEngine;
import org.apache.ws.security.components.crypto.Crypto;
@@ -51,7 +52,7 @@
protected static final String WSSECHEADER_ACTOR="actor";
private static final String URN_USER_FED = ":user:";
- protected static final Logger logger =
Logger.getLogger(SecTokenSOAPManager.class.getName());
+ protected static final Logger logger =
LoggerFactory.getLogger(SecTokenSOAPManager.class);
public Object getSTFromRequest() throws PerfSONARException {
if (!hasSTInRequest())
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/axis2interface/PerfsonarService.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/axis2interface/PerfsonarService.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/axis2interface/PerfsonarService.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -3,7 +3,8 @@
import org.apache.axiom.om.OMElement;
import org.apache.axis2.context.ServiceContext;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.perfsonar.base2.service.configuration.ConfigurationManager;
import org.perfsonar.base2.service.requesthandler.axis2.Axis2RequestHandler;
import org.perfsonar.base2.service.validation.JREVersion;
@@ -47,7 +48,7 @@
//runs while starting
final JREVersion jreVersion = new JREVersion();
if (!jreVersion.isJRECompatibleWith(1, 6)) {
- Logger.getLogger(PerfsonarService.class).error("In order to
run perfSONAR service JRE version must be >= 1.6.0. "
+ LoggerFactory.getLogger(PerfsonarService.class).error("In
order to run perfSONAR service JRE version must be >= 1.6.0. "
+ "JRE version is " + jreVersion.getJREVersion() + "."
+ "The application will terminate the servlet
container.");
System.exit(1);
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/ConfigurationManager.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/ConfigurationManager.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/ConfigurationManager.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -10,7 +10,8 @@
import org.apache.commons.digester.Digester;
import org.apache.commons.digester.xmlrules.DigesterLoader;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.perfsonar.base2.service.exceptions.PerfSONARException;
/**
@@ -49,7 +50,7 @@
protected String digesterRules = DEFAULT_CONFIG_DIR_PREFIX + "/" +
DEFAULT_CONFIG_RULES;
protected String digesterInput = DEFAULT_CONFIG_DIR_PREFIX + "/" +
DEFAULT_CONFIG_INPUT;
- protected static final Logger logger =
Logger.getLogger(ConfigurationManager.class.getName());
+ protected static final Logger logger =
LoggerFactory.getLogger(ConfigurationManager.class);
private static ConfigurationManager configurationManager = new
ConfigurationManager();
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/OptionEntry.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/OptionEntry.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/OptionEntry.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -8,7 +8,8 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Configuration: Options
@@ -23,7 +24,7 @@
protected Map<String,Option> options = null;
- protected static final Logger logger =
Logger.getLogger("org.perfsonar.base2.service.configuration");
+ protected static final Logger logger =
LoggerFactory.getLogger("org.perfsonar.base2.service.configuration");
// -----------------------------------------------------------
Constructor
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/migration/MigratorComponent.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/migration/MigratorComponent.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/configuration/migration/MigratorComponent.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -5,7 +5,8 @@
import java.net.URISyntaxException;
import java.net.URL;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.perfsonar.base2.service.configuration.Component;
import org.perfsonar.base2.service.exceptions.PerfSONARException;
@@ -16,7 +17,7 @@
*
*/
public class MigratorComponent extends Component {
- private static Logger logger =
Logger.getLogger(MigratorComponent.class);
+ private static Logger logger =
LoggerFactory.getLogger(MigratorComponent.class);
private TemplateEngine engine;
private ConfigFilesCollection configFiles;
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/messages/GenericMessageHandler.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/messages/GenericMessageHandler.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/messages/GenericMessageHandler.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -12,7 +12,8 @@
import java.util.List;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.perfsonar.base2.service.authn.component.AuthNComponent;
import org.perfsonar.base2.service.configuration.Configuration;
import org.perfsonar.base2.service.configuration.ConfigurationManager;
@@ -36,7 +37,7 @@
public class GenericMessageHandler implements MessageHandler {
- private static final Logger logger =
Logger.getLogger(GenericMessageHandler.class.getName());
+ private static final Logger logger =
LoggerFactory.getLogger(GenericMessageHandler.class);
public GenericMessageHandler() throws PerfSONARException {
@@ -136,9 +137,9 @@
} catch (RuntimeException rex) {
//just in case of unexpected runtime exception such as
//null, indexoutofbounds, classcast, etc.
- logger.error(rex,rex);
+ logger.error("Service engine failed", rex);
throw new PerfSONARException(
- "runtime_exception", "Runtime exception in
ServiceEngine: "+rex.getMessage());
+ "runtime_exception", "Runtime exception in
ServiceEngine: "+rex.getMessage(), rex);
}
} catch (PerfSONARException e) {
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/AbstractRegistrationAction.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/AbstractRegistrationAction.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/AbstractRegistrationAction.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -11,7 +11,8 @@
import java.util.LinkedList;
import java.util.List;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.perfsonar.base2.service.configuration.Action;
import org.perfsonar.base2.service.configuration.Configuration;
import org.perfsonar.base2.service.configuration.ConfigurationManager;
@@ -49,7 +50,7 @@
private boolean initialized = false;
- private Logger logger =
Logger.getLogger(AbstractRegistrationAction.class);
+ private Logger logger =
LoggerFactory.getLogger(AbstractRegistrationAction.class);
private final String KEEP_ALIVE_OPTION="keepAlive";
@@ -96,10 +97,7 @@
init();
initialized = true;
} catch (PerfSONARException e) {
- e.printStackTrace();
- logger.warn(e);
- logger.warn("Cannot initialize "
- +
this.getClass().getCanonicalName());
+ logger.warn("Cannot initialize " +
getClass().getCanonicalName(), e);
}
}
execute();
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/DumbRegisterDataSource.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/DumbRegisterDataSource.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/DumbRegisterDataSource.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -12,7 +12,8 @@
import org.perfsonar.base2.xml.nmwg.Metadata;
import org.perfsonar.base2.xml.nmwg.Data;
-//import org.apache.log4j.Logger;
+//import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class DumbRegisterDataSource implements RegisterDataSource {
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/GenericLSRegistrator.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/GenericLSRegistrator.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/GenericLSRegistrator.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -18,7 +18,8 @@
import java.net.URL;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class GenericLSRegistrator implements LSRegistrator {
@@ -26,7 +27,7 @@
// ----------------------------------------------------------- Variables
- private static final Logger logger =
Logger.getLogger(GenericLSRegistrator.class.getName());
+ private static final Logger logger =
LoggerFactory.getLogger(GenericLSRegistrator.class);
// ----------------------------------------------------------- Methods
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/LSRegistrationAction.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/LSRegistrationAction.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/LSRegistrationAction.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -5,7 +5,8 @@
import java.util.LinkedList;
import java.util.List;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.perfsonar.base2.service.exceptions.PerfSONARException;
import org.perfsonar.base2.service.requesthandler.ServiceMessage;
import org.perfsonar.base2.xml.Element;
@@ -20,7 +21,7 @@
*/
public class LSRegistrationAction extends AbstractRegistrationAction {
- private Logger logger = Logger.getLogger(LSRegistrationAction.class);
+ private Logger logger =
LoggerFactory.getLogger(LSRegistrationAction.class);
private boolean keepAliveEnabled=false;
@@ -82,8 +83,7 @@
try {
serviceRequestMessage =
getLSRegisterMessage();
} catch (PerfSONARException e) {
- logger.warn("Cannot build registration
message !");
- logger.warn(e);
+ logger.warn("Cannot build registration
message !", e);
}
int nrOfAddresses = lsAddresses.size();
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/MetadataExistDBRegisterDataSource.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/MetadataExistDBRegisterDataSource.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/registration/MetadataExistDBRegisterDataSource.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -32,7 +32,7 @@
protected final static String
REGISTER_DATA_SOURCE_EXTENSION_NAME="registerExtension-registerDataSource";
- //private static final Logger logger =
Logger.getLogger(ExistDBRegisterDataSource.class.getName());
+ //private static final Logger logger =
LoggerFactory.getLogger(ExistDBRegisterDataSource.class);
// ------------------------------------------------------------- Methods
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/requesthandler/EchoServiceEngine.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/requesthandler/EchoServiceEngine.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/requesthandler/EchoServiceEngine.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -10,7 +10,8 @@
import org.perfsonar.base2.xml.nmwg.EventType;
import org.perfsonar.base2.xml.Element;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* $Id: EchoServiceEngine.java 4684 2008-11-03 13:07:33Z roman $
@@ -23,8 +24,7 @@
// ------------------------------------------------------------- class
// fields
- private static final Logger logger = Logger
- .getLogger(EchoServiceEngine.class.getName());
+ private static final Logger logger =
LoggerFactory.getLogger(EchoServiceEngine.class);
public static final String ECHO_EVENT_TYPE =
"http://schemas.perfsonar.net/tools/admin/echo/2.0";
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/requesthandler/RequestHandler.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/requesthandler/RequestHandler.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/requesthandler/RequestHandler.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -1,6 +1,7 @@
package org.perfsonar.base2.service.requesthandler;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.perfsonar.base2.service.configuration.ConfigurationManager;
import org.perfsonar.base2.service.exceptions.PerfSONARException;
import org.perfsonar.base2.service.messages.MessageHandler;
@@ -20,7 +21,7 @@
// ----------------------------------------------------- instance
variables
- private static final Logger logger =
Logger.getLogger(RequestHandler.class.getName());
+ private static final Logger logger =
LoggerFactory.getLogger(RequestHandler.class);
// -----------------------------------------------------------
Constructor
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/requesthandler/axis2/Axis2RequestHandler.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/requesthandler/axis2/Axis2RequestHandler.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/requesthandler/axis2/Axis2RequestHandler.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -9,7 +9,8 @@
import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.axis2.context.ServiceContext;
@@ -46,7 +47,7 @@
private ConfigurationManager configurationManager = null;
- private static final Logger logger =
Logger.getLogger(Axis2RequestHandler.class.getName());
+ private static final Logger logger =
LoggerFactory.getLogger(Axis2RequestHandler.class);
// ------------------------------------------------------------
constructor
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/SchedulerTask.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/SchedulerTask.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/SchedulerTask.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -1,6 +1,7 @@
package org.perfsonar.base2.service.scheduler;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Scheduler Task is a wrapper for Scheduler Action. Scheduler runs tasks
with
@@ -12,7 +13,7 @@
*/
public class SchedulerTask {
- protected static final Logger logger =
Logger.getLogger(SchedulerTask.class.getName());
+ protected static final Logger logger =
LoggerFactory.getLogger(SchedulerTask.class);
// --------------------------------------------- Variables
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/SimpleAction.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/SimpleAction.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/SimpleAction.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -5,7 +5,8 @@
package org.perfsonar.base2.service.scheduler;
import org.perfsonar.base2.service.configuration.Action;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* This is an example of scheduler action. It just prints a message into Log
@@ -19,7 +20,7 @@
// ----------------------------------------------------------- Variables
- protected static final Logger logger =
Logger.getLogger(SimpleAction.class.getName());
+ protected static final Logger logger =
LoggerFactory.getLogger(SimpleAction.class);
int counter = 0;
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/SimpleScheduler.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/SimpleScheduler.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/SimpleScheduler.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -5,7 +5,8 @@
import java.util.HashSet;
import java.util.Set;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Simple and default implementation of Scheduler for perfSONAR services
@@ -40,7 +41,7 @@
*/
protected int startDelayTime = 40; //sec
- protected static final Logger logger =
Logger.getLogger(SimpleScheduler.class.getName());
+ protected static final Logger logger =
LoggerFactory.getLogger(SimpleScheduler.class);
// ----------------------------------------------------------- Methods
@@ -90,7 +91,7 @@
}
} catch (ConcurrentModificationException cme) {
- logger.error(cme);
+ logger.error("Transient failure in scheduler", cme);
}
}
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/singleThread/SingleThreadScheduler.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/singleThread/SingleThreadScheduler.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/scheduler/singleThread/SingleThreadScheduler.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -5,7 +5,8 @@
import java.util.LinkedList;
import java.util.List;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.perfsonar.base2.service.scheduler.Scheduler;
import org.perfsonar.base2.service.scheduler.SchedulerAction;
import org.perfsonar.base2.service.scheduler.SchedulerTask;
@@ -39,7 +40,7 @@
*/
protected int startDelayTime = 40; // sec
- protected final Logger logger =
Logger.getLogger(SingleThreadScheduler.class);
+ protected final Logger logger =
LoggerFactory.getLogger(SingleThreadScheduler.class);
public void start() {
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/servlets/AuthServlet.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/servlets/AuthServlet.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/servlets/AuthServlet.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -8,7 +8,8 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.codec.binary.Base64;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.perfsonar.base2.service.configuration.ConfigurationManager;
import org.perfsonar.base2.service.exceptions.PerfSONARException;
@@ -21,7 +22,7 @@
@SuppressWarnings("serial")
public abstract class AuthServlet extends HttpServlet {
- private Logger logger = Logger.getLogger(AuthServlet.class);
+ private Logger logger = LoggerFactory.getLogger(AuthServlet.class);
private String username;
private String password;
@@ -70,7 +71,7 @@
try {
processRequest(req, resp);
} catch (PerfSONARException e) {
- logger.warn(e);
+ logger.warn("Request processing failed", e);
resp.setHeader("WWW-Authenticate", "BASIC
realm=\"users\"");
resp.sendError(HttpServletResponse.SC_UNAUTHORIZED);
}
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/servlets/ExistDBInitServlet.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/servlets/ExistDBInitServlet.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/servlets/ExistDBInitServlet.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -2,7 +2,8 @@
import java.io.File;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.exist.security.User;
import org.exist.xmldb.UserManagementService;
import org.xmldb.api.DatabaseManager;
@@ -21,7 +22,7 @@
@SuppressWarnings("serial")
public abstract class ExistDBInitServlet extends AuthServlet {
- private Logger logger = Logger.getLogger(ExistDBInitServlet.class);
+ private Logger logger =
LoggerFactory.getLogger(ExistDBInitServlet.class);
/**
*
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/service/simpleservice/SimpleServiceServiceEngine.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/service/simpleservice/SimpleServiceServiceEngine.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/service/simpleservice/SimpleServiceServiceEngine.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -6,7 +6,8 @@
import org.perfsonar.base2.service.requesthandler.ServiceMessage;
import org.perfsonar.base2.xml.nmwg.Message;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -15,7 +16,7 @@
public class SimpleServiceServiceEngine implements ServiceEngine {
- private static final Logger logger =
Logger.getLogger(SimpleServiceServiceEngine.class.getName());
+ private static final Logger logger =
LoggerFactory.getLogger(SimpleServiceServiceEngine.class);
public void takeAction(ServiceMessage serviceRequest, ServiceMessage
serviceResponse)
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/test/StaxParserSimple.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/test/StaxParserSimple.java
2012-08-21 10:48:07 UTC (rev 5967)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/test/StaxParserSimple.java
2012-08-21 10:48:08 UTC (rev 5968)
@@ -8,7 +8,8 @@
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.perfsonar.base2.xml.Element;
/**
@@ -19,7 +20,7 @@
*/
public class StaxParserSimple {
- private final Logger logger =
Logger.getLogger(StaxParserSimple.class);
+ private final Logger logger =
LoggerFactory.getLogger(StaxParserSimple.class);
private static final String DEFAULT_ELEMENT_CLASSNAME =
"org.perfsonar.base2.xml.Element";
private static final String ANY_ELEMENT = "*";
- [pS-dev] [GEANT/SA2/ps-java-services] r5968 - in trunk/perfsonar-java-base2: . src/main/java/org/perfsonar/base2/service/authn src/main/java/org/perfsonar/base2/service/authn/tokens src/main/java/org/perfsonar/base2/service/axis2interface src/main/java/org/perfsonar/base2/service/configuration src/main/java/org/perfsonar/base2/service/configuration/migration src/main/java/org/perfsonar/base2/service/messages src/main/java/org/perfsonar/base2/service/registration src/main/java/org/perfsonar/base2/service/requesthandler src/main/java/org/perfsonar/base2/service/requesthandler/axis2 src/main/java/org/perfsonar/base2/service/scheduler src/main/java/org/perfsonar/base2/service/scheduler/singleThread src/main/java/org/perfsonar/base2/servlets src/main/java/org/perfsonar/service/simpleservice src/main/java/org/perfsonar/test, svn-noreply, 08/21/2012
Archive powered by MHonArc 2.6.16.