diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-17 22:49:02 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-17 22:49:02 +1200 |
commit | b88c3f7c1cdd0461ed6ed8e9772d5cf944efade8 (patch) | |
tree | f4c1d89fcae764b9f3c8384b05b00e4ee1ddd9fd /src/org/traccar | |
parent | 3788d87908509c4d59898e0e41de5f6a73ecc67b (diff) | |
download | trackermap-server-b88c3f7c1cdd0461ed6ed8e9772d5cf944efade8.tar.gz trackermap-server-b88c3f7c1cdd0461ed6ed8e9772d5cf944efade8.tar.bz2 trackermap-server-b88c3f7c1cdd0461ed6ed8e9772d5cf944efade8.zip |
Print extended stack trace
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/helper/Log.java | 10 |
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(")"); |