Error loading log files when debug line is too large

Apr 6, 2016 at 5: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.

https://onedrive.live.com/redir?resid=87BB57E6F37CA1EA!3435&authkey=!AMh_F-OERkOOXVA&ithint=folder%2c
Apr 6, 2016 at 8: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 - https://onedrive.live.com/redir?resid=87BB57E6F37CA1EA!3431&authkey=!AJnHE93lj0UQe-M&ithint=folder%2cxml
Coordinator
Apr 7, 2016 at 5: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 5: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.
Coordinator
Apr 8, 2016 at 12:06 PM
Edited Apr 8, 2016 at 12:12 PM
Pushed a change that allows new config value in the format description file
  <view-options>
    <wrap-text>500</wrap-text>
  </view-options>
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 8:32 PM
Fantastic, works great. Thanks for the help.