LogViewPlus Support

Dynamic Creation of Columns by CustomReader

https://www.logviewplus.com/forum/Topic2050.aspx

By phw - 1 Feb 2024

Hi there
I have built a plugin based on your project: custom reader.
The Plugin reads logfiles provided by a service.
But we have a lot of different types of logfiles, from different applications.
What i want to do now is create some additional columns in the viewer (dynamically created by the data received).
The Clearcove.LogViewer.Common.LogEntry object seems to be limited to the standard columns.

now:


what i want:


Is there a way to achieve this with this plugin?
Or is there a way to achieve this with any plugin?

Thanks for your answer.
phw

By LogViewPlus Support - 1 Feb 2024

Hi Phw,

If you look at MyParser in the sample projects, the GetSupportedTypes method implements a string column.  You can use a string column to create the needed custom columns.

GetSupportedTypes will be called after the Initialize method, but before the parser receives any data.  It is not possible to dynamically change the columns based on the log entry data.  LogViewPlus can do this through message parsers, but this is an application feature independent of the parser.

In other words, columns need to be defined for the log file in advance.  All log entries in the file must follow the same metadata structure.

Maybe you could use the parser configuration / Initialize method to help determine the columns in advance?

Hope that helps,

Toby
By phw - 1 Feb 2024

Hi Toby
Thank you very much, I will try this out.
have a nice day