diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-03-21 14:45:05 +0100 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-03-21 14:45:05 +0100 |
commit | f3f35663f362ce6722eaa26598fb5aa8c4c6d962 (patch) | |
tree | bc9d66ebe1b5b840c6e3bf0087a8dd58040528a1 /common/src/main | |
parent | 05212e955f2c44bd3150b47d9d534c5a73eb71d1 (diff) | |
parent | 658cb68c445d5b73815c43b66dd717483a425ea5 (diff) | |
download | moa-id-spss-f3f35663f362ce6722eaa26598fb5aa8c4c6d962.tar.gz moa-id-spss-f3f35663f362ce6722eaa26598fb5aa8c4c6d962.tar.bz2 moa-id-spss-f3f35663f362ce6722eaa26598fb5aa8c4c6d962.zip |
Merge remote-tracking branch 'remotes/origin/vidp' into moa2_0_tlenz
Conflicts:
id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java
id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java
id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java
id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties
id/server/moa-id-commons/pom.xml
id/server/stork2-saml-engine/pom.xml
pom.xml
repository/iaik/iaik_tsl/1.0/iaik_tsl-1.0.jar
repository/iaik/iaik_tsl/1.0/iaik_tsl-1.0.pom
Diffstat (limited to 'common/src/main')
-rw-r--r-- | common/src/main/java/at/gv/egovernment/moa/logging/Logger.java | 67 | ||||
-rw-r--r-- | common/src/main/java/at/gv/egovernment/moa/util/Constants.java | 5 |
2 files changed, 31 insertions, 41 deletions
diff --git a/common/src/main/java/at/gv/egovernment/moa/logging/Logger.java b/common/src/main/java/at/gv/egovernment/moa/logging/Logger.java index 07f9e27af..2e76325a5 100644 --- a/common/src/main/java/at/gv/egovernment/moa/logging/Logger.java +++ b/common/src/main/java/at/gv/egovernment/moa/logging/Logger.java @@ -24,9 +24,6 @@ package at.gv.egovernment.moa.logging; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - /** * A utility class acting as a facade to the logging subsystem. * @@ -39,35 +36,13 @@ import org.apache.commons.logging.LogFactory; */ public class Logger { - /** The default logging hierarchy. */ - private static String defaultHierarchy = ""; - - /** - * Get the <code>Log</code> object for the default hierarchy. - * - * @return The <code>Log</code> object to write log messages to. - */ - private static Log getLog() { - return LogFactory.getLog(defaultHierarchy); - } - - /** - * Get the <code>Log</code> object for a given hierarchy. - * - * @param hierarchy The logging hierarchy for which to return the logger. - * @return The <code>Log</code> object to write log messages to. - */ - private static Log getLog(String hierarchy) { - return LogFactory.getLog(hierarchy); - } - /** * Set the default hierarchy to which the <code>Logger</code> should send its * logging output. * @param hierarchy The logging defaultHierarchy. */ public static void setHierarchy(String hierarchy) { - defaultHierarchy = hierarchy; + // there is no need for that anymore } /** @@ -77,7 +52,8 @@ public class Logger { * <code>false</code> otherwise. */ public static boolean isTraceEnabled() { - return getLog().isTraceEnabled(); + org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Thread.currentThread().getStackTrace()[2].getClassName()); + return logger.isTraceEnabled(); } /** @@ -88,7 +64,8 @@ public class Logger { * <code>false</code> otherwise. */ public static boolean isTraceEnabled(String hierarchy) { - return getLog(hierarchy).isTraceEnabled(); + org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Thread.currentThread().getStackTrace()[2].getClassName()); + return logger.isTraceEnabled(); } /** @@ -97,7 +74,8 @@ public class Logger { * @param message The message to trace. */ public static void trace(Object message) { - getLog().trace(message); + org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Thread.currentThread().getStackTrace()[2].getClassName()); + logger.trace(message); } /** @@ -107,7 +85,8 @@ public class Logger { * <code>false</code> otherwise. */ public static boolean isDebugEnabled() { - return getLog().isDebugEnabled(); + org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Thread.currentThread().getStackTrace()[2].getClassName()); + return logger.isDebugEnabled(); } /** @@ -118,7 +97,8 @@ public class Logger { * <code>false</code> otherwise. */ public static boolean isDebugEnabled(String hierarchy) { - return getLog(hierarchy).isDebugEnabled(); + org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Thread.currentThread().getStackTrace()[2].getClassName()); + return logger.isDebugEnabled(); } /** @@ -127,7 +107,8 @@ public class Logger { * @param message The message to log. */ public static void debug(Object message) { - getLog().debug(message); + org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Thread.currentThread().getStackTrace()[2].getClassName()); + logger.debug(message); } /** @@ -136,7 +117,8 @@ public class Logger { * @param message The message to log. */ public static void info(Object message) { - getLog().info(message); + org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Thread.currentThread().getStackTrace()[2].getClassName()); + logger.info(message); } /** @@ -145,7 +127,8 @@ public class Logger { * @param message The message to log. */ public static void warn(Object message) { - getLog().warn(message); + org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Thread.currentThread().getStackTrace()[2].getClassName()); + logger.warn(message); } /** @@ -155,7 +138,8 @@ public class Logger { * @param t An exception that may be the cause of the warning. */ public static void warn(Object message, Throwable t) { - getLog().warn(message, t); + org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Thread.currentThread().getStackTrace()[2].getClassName()); + logger.warn(message, t); } /** @@ -164,7 +148,8 @@ public class Logger { * @param message The message to log. */ public static void error(Object message) { - getLog().error(message); + org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Thread.currentThread().getStackTrace()[2].getClassName()); + logger.error(message); } /** @@ -174,7 +159,8 @@ public class Logger { * @param t An exception that may be the cause of the error. */ public static void error(Object message, Throwable t) { - getLog().error(message, t); + org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Thread.currentThread().getStackTrace()[2].getClassName()); + logger.error(message, t); } /** @@ -183,7 +169,8 @@ public class Logger { * @param message The message to log. */ public static void fatal(Object message) { - getLog().fatal(message); + org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Thread.currentThread().getStackTrace()[2].getClassName()); + logger.fatal(message); } /** @@ -193,7 +180,7 @@ public class Logger { * @param t An exception that may be the cause of the error. */ public static void fatal(Object message, Throwable t) { - getLog().fatal(message, t); + org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Thread.currentThread().getStackTrace()[2].getClassName()); + logger.fatal(message, t); } - } diff --git a/common/src/main/java/at/gv/egovernment/moa/util/Constants.java b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java index 213eb6242..ed75768ba 100644 --- a/common/src/main/java/at/gv/egovernment/moa/util/Constants.java +++ b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java @@ -429,7 +429,10 @@ public interface Constants { /** URN prefix for context dependent id (wbPK). */ public static final String URN_PREFIX_WBPK = URN_PREFIX + ":wbpk"; - + + /** URN prefix for context dependent id (stork). */ + public static final String URN_PREFIX_STORK = URN_PREFIX + ":storkid"; + /** URN prefix for context dependent id. */ public static final String URN_PREFIX_BASEID = URN_PREFIX + ":baseid"; |