aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2015-04-09 12:44:04 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2015-04-09 12:44:04 +0200
commit2a4c182dd0209a6b9321d7f38a977eb1046de165 (patch)
tree8abc407e1ad700692af0ccd86669dbc6da75e8d7 /common
parent8400b9d9734f45d53ac722e85e04c599fdccfe0d (diff)
parente98bdf2b39ecb9100e64c8077752ed7c4ed883b3 (diff)
downloadmoa-id-spss-2a4c182dd0209a6b9321d7f38a977eb1046de165.tar.gz
moa-id-spss-2a4c182dd0209a6b9321d7f38a977eb1046de165.tar.bz2
moa-id-spss-2a4c182dd0209a6b9321d7f38a977eb1046de165.zip
Merge branch '2.2.x-Snapshot' of gitlab.iaik.tugraz.at:afitzek/moa-idspss into 2.2.x-Snapshot
Diffstat (limited to 'common')
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/logging/Logger.java9
1 files changed, 8 insertions, 1 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 6999656ab..265ad026d 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
@@ -58,7 +58,14 @@ public class Logger {
* @return the logger
*/
private static synchronized org.slf4j.Logger getLogger() {
- String className = Thread.currentThread().getStackTrace()[3].getClassName();
+ StackTraceElement[] stacktrace = Thread.currentThread().getStackTrace();
+
+ int i;
+ for(i = 2; i < stacktrace.length; i++)
+ if(!stacktrace[i].getClassName().equals(Logger.class.getName()))
+ break;
+
+ String className = stacktrace[i].getClassName();
org.slf4j.Logger logger = instances.get(className);
if (logger != null) {