Dynamic Creation of Columns by CustomReader

Posted on Feb 1, 2024 at 6:56 AM
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

Posted on Feb 1, 2024 at 8:13 AM
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
Posted on Feb 1, 2024 at 8:33 AM
Hi Toby
Thank you very much, I will try this out.
have a nice day

This topic is closed and cannot receive new replies.