diff options
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(")"); |