Lines 50-59
Link Here
|
50 |
|
50 |
|
51 |
reader = new BufferedReader(new InputStreamReader(new TailInputStream(file, MAX_FILE_LENGTH), "UTF-8")); //$NON-NLS-1$ |
51 |
reader = new BufferedReader(new InputStreamReader(new TailInputStream(file, MAX_FILE_LENGTH), "UTF-8")); //$NON-NLS-1$ |
52 |
for (;;) { |
52 |
for (;;) { |
53 |
String line = reader.readLine(); |
53 |
String line0 = reader.readLine(); |
54 |
if (line == null) |
54 |
if (line0 == null) |
55 |
break; |
55 |
break; |
56 |
line = line.trim(); |
56 |
String line = line0.trim(); |
57 |
|
57 |
|
58 |
if (line.startsWith(LogSession.SESSION)) { |
58 |
if (line.startsWith(LogSession.SESSION)) { |
59 |
state = SESSION_STATE; |
59 |
state = SESSION_STATE; |
Lines 69-76
Link Here
|
69 |
state = TEXT_STATE; |
69 |
state = TEXT_STATE; |
70 |
|
70 |
|
71 |
if (state == TEXT_STATE) { |
71 |
if (state == TEXT_STATE) { |
72 |
if (writer != null) |
72 |
if (writer != null) { |
73 |
writer.println(line); |
73 |
if (swriter.getBuffer().length() > 0) |
|
|
74 |
writer.println(); |
75 |
writer.print(line0); |
76 |
} |
74 |
continue; |
77 |
continue; |
75 |
} |
78 |
} |
76 |
|
79 |
|
Lines 129-136
Link Here
|
129 |
writer = new PrintWriter(swriter, true); |
132 |
writer = new PrintWriter(swriter, true); |
130 |
String message = ""; //$NON-NLS-1$ |
133 |
String message = ""; //$NON-NLS-1$ |
131 |
if (line.length() > 8) |
134 |
if (line.length() > 8) |
132 |
message = line.substring(9).trim(); |
135 |
message = line.substring(9); |
133 |
message = message.trim(); |
|
|
134 |
if (current != null) |
136 |
if (current != null) |
135 |
current.setMessage(message); |
137 |
current.setMessage(message); |
136 |
writerState = MESSAGE_STATE; |
138 |
writerState = MESSAGE_STATE; |
Lines 169-176
Link Here
|
169 |
session.setSessionData(swriter.toString()); |
171 |
session.setSessionData(swriter.toString()); |
170 |
} else if (writerState == MESSAGE_STATE && current != null) { |
172 |
} else if (writerState == MESSAGE_STATE && current != null) { |
171 |
StringBuffer sb = new StringBuffer(current.getMessage()); |
173 |
StringBuffer sb = new StringBuffer(current.getMessage()); |
172 |
sb.append(swriter.toString()); |
174 |
String continuation = swriter.toString(); |
173 |
current.setMessage(sb.toString().trim()); |
175 |
if (continuation.length() > 0) |
|
|
176 |
sb.append(System.getProperty("line.separator")).append(continuation); //$NON-NLS-1$ |
177 |
current.setMessage(sb.toString()); |
174 |
} |
178 |
} |
175 |
} |
179 |
} |
176 |
|
180 |
|