Text Column not visible for more than 20000 chars

Feb 27, 2014 at 6:48 PM
I've just met this project today, and its features are very good, congratulations to the developers involved.

But for the intended use I was trying to apply it, mainly with large xml, json communications logs, I'had realized that this application isn't showing visible the Text Column for line records with more than 20000 chars, and in our use we can overcome this 20000 so easily and frequently.

I'had analysed the source code, and find an setting for "const int MAX_LINE_LEN = 20000;", I've just tryed Recompile/Debug to increase to an higger value which can handle our xml/json length, but also with this application still not showing visible that big content text lines, but if I do an copy to clipboard of the line within, then I can paste all entire message content to an notepad. Maybe it's also limited in another drawing methods.

Has anyone tried to overcome this? I hope this can be an great improvement, such as with another applications, they simple cannot handle large log files or message contents.

Thanks in advance...
Feb 27, 2014 at 7:20 PM

this hardcoded limit was applied to cut very long lines. This is needed due to a bug (or limit?) in the DataGridView control (which is used for displaying the log). If the line is too long, nothing is shown. The actual value of 20000 was a guess.
Feb 28, 2014 at 1:15 PM
Hello Hagen,

I think I've just resolved this with an small mods to the source code as following, and then just rebuild:

.PositionAwareStreamReader.cs >> MAX_LINE_LEN = 2000000; << (Maybe later this value can moved to the "Settings" window for more flexibility);

.LogWindow.cs >> New Declaration: private const int MAX_LINE_LEN_PRNT = 600; << (Max text string length to print > 600 works well for an "Setting" of "Set last column width" of "4250" >> Maybe later this value can moved to the "Settings" window for more flexibility);

.LogWindow.cs > Bellow Line >> string matchWord = (value as string).Substring(matchEntry.StartPos, matchEntry.Length); >> Add the following new Line:
matchWord = matchWord.Substring(0, Math.Min(MAX_LINE_LEN_PRNT, matchWord.Length)) + (matchWord.Length > MAX_LINE_LEN_PRNT ? "... " : "");

After this mods, when running, for large text you will see "message...", and then you can simply "select the line" and do "copy to clipboard" to access all message content, for notepad, etc.
Maybe latter, to the selected line context menu, it can been added an new option "View all message content" to open an new text window which can show all the complete text.

Hope this will be very useful... :D