Custom Text Display


Author
Message
Email User
Email User
I'm hooked (409 reputation)I'm hooked (409 reputation)I'm hooked (409 reputation)I'm hooked (409 reputation)I'm hooked (409 reputation)I'm hooked (409 reputation)I'm hooked (409 reputation)I'm hooked (409 reputation)I'm hooked (409 reputation)
Group: Forum Members
Posts: 36, Visits: 115
Hi,

I'm currently evaluating your product, seems promising. We have a complex, JSON-based log file format in our company, I was able to parse it with a custom parser DLL. The grid view shows the relevant values from the log, but due to the complexity of the log-entries, it is impossible to show all values in the grid, especially when the entry contains sub objects, for example serialized exception data or payload-objects.

So I was thinking about reformatting the log entry in a text only format and display it in the bottom area of the logviewer window. I have set the property LogEntry.OriginalLogEntry to this reformatted text, but the logviewer always displays the data readed from the log file. Is there a possibility to show custom text in the bottom area of the log viewer? Another question, it would be great if the log entries in the grid could be double clicked, notifying a plugin about this event. One could then extend logview plus with a UI especially designed to visualize the whole log entry. This would be very useful for complex log entries.

Thanks for your answers
Reply
LogViewPlus Support
LogViewPlus Support
Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)
Group: Moderators
Posts: 1.2K, Visits: 4.3K
Hi,
 
I have taken a closer look at this problem.  The issue is that the OriginalLogEntry is set by the text file reader after you set it in your parser.  What you can do is implement the IFinalizeLogEntry interface on your parser.  This method will give your parser a final look at the log entry after all processing is complete.  Your implementation would look something like:
 
public void FinalizeLogEntry(LogEntry entry, string unparsedData, ParseResult result)
{
                entry.OriginalLogEntry = "My new value”;
}

 
The parse is single threaded, so there shouldn’t be a problem with maintaining state over the method calls if needed.
 
I will be making changes to newer versions of LogViewPlus which allow the parser to set the OriginalLogEntry value on the first pass.  These changes should be in BETA tomorrow.  However, taking advantage of the newer technique would require all users to be on the latest version – so it is probably not a good idea to do this right now.
 
Hope that helps,
 
Toby
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Login

Explore
Messages
Mentions
Search