Error loading log files when debug line is too large

Apr 6, 2016 at 4:47 PM
We are having problems viewing our debug in log joint when a single debug entry becomes very large. Two things happen, when the entry is 32k to 60k approximately it loads but clicking gives an exception in DrawString and it shows a red x. Once the line becomes very large, 100k+ it fails to load all future lines.

Can you help us out with this. I'm thinking we can chop off the string a certain size to fix the DrawString error but i'm not sure on the not loading future events.

samples of our logging format and a log file with a large entry in. Should show 3 lines.!3435&authkey=!AMh_F-OERkOOXVA&ithint=folder%2c
Apr 6, 2016 at 7:18 PM
ok, so i found the option max-message-size, loads the file now but still get exceptions when drawing the text.

Updated the format with max-message-size setting -!3431&authkey=!AJnHE93lj0UQe-M&ithint=folder%2cxml
Apr 7, 2016 at 4:20 PM
You have 100k long messages. It exceeds 32k - the limit of gdi+ string drawing and measuring functions. It's difficult to overcome the limitation. Basically one would have to re-implement gdi+ functions for too big strings.
Maybe a subset of relatively simple functions needs modification. Let me repro and see.
But in my opinion you should modify your logged not to write that much per one message. When displayed such messages will probably be difficult to read.
Apr 7, 2016 at 4:39 PM
I know, crazy to log that much, unfortunately i don't have any control over that. I'm fine with chopping it off to get things to load as you said it's pretty unreadable at that point. Logging this much is definitely not common, but when it's there it causes the file to not be able to be loaded by log joint.

I was looking into limiting the string size in XmlLogReader.GetAndClearContent(). That works works for the xslt formated text but it still has a problem when viewing the raw text.

I'm sure you will have a more complete solution.
Apr 8, 2016 at 11:06 AM
Edited Apr 8, 2016 at 11:12 AM
Pushed a change that allows new config value in the format description file
This will wrap long text messages. Your 100k-chars-long message will be rendered as multi-line message. Multi-line messages are not very efficient. On my PC your sample file is handled with noticeable lags. But at least it does not crash.
Apr 8, 2016 at 7:32 PM
Fantastic, works great. Thanks for the help.