aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-17 22:49:02 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-17 22:49:02 +1200
commitb88c3f7c1cdd0461ed6ed8e9772d5cf944efade8 (patch)
treef4c1d89fcae764b9f3c8384b05b00e4ee1ddd9fd /src/org/traccar/helper
parent3788d87908509c4d59898e0e41de5f6a73ecc67b (diff)
downloadtraccar-server-b88c3f7c1cdd0461ed6ed8e9772d5cf944efade8.tar.gz
traccar-server-b88c3f7c1cdd0461ed6ed8e9772d5cf944efade8.tar.bz2
traccar-server-b88c3f7c1cdd0461ed6ed8e9772d5cf944efade8.zip
Print extended stack trace
Diffstat (limited to 'src/org/traccar/helper')
-rw-r--r--src/org/traccar/helper/Log.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/org/traccar/helper/Log.java b/src/org/traccar/helper/Log.java
index 6777c45b5..f9ec53682 100644
--- a/src/org/traccar/helper/Log.java
+++ b/src/org/traccar/helper/Log.java
@@ -127,7 +127,7 @@ public class Log {
getLogger().debug(msg);
}
- private static final int MESSAGE_LIMIT = 80;
+ private static final int MESSAGE_LIMIT = 120;
private static final int STACK_LIMIT = 3;
public static String exception(Throwable exception) {
@@ -146,7 +146,6 @@ public class Log {
s.append(stack[0].getLineNumber());
if (exceptionMsg == null || exceptionMsg.length() < MESSAGE_LIMIT) {
- int count = STACK_LIMIT - 1;
boolean skip = false;
for (int i = 1; i < stack.length; i += 1) {
if (stack[i].getClassName().startsWith("org.traccar")) {
@@ -158,14 +157,13 @@ public class Log {
s.append(stack[i].getFileName());
s.append(":");
s.append(stack[i].getLineNumber());
- count -= 1;
- if (count == 0) {
- break;
- }
} else {
skip = true;
}
}
+ if (skip) {
+ s.append(" < ...");
+ }
}
s.append(")");