Add custom values to filtered log entries


Author
Message
AndreasP
AndreasP
Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)
Group: Forum Members
Posts: 49, Visits: 216
Hi Toby,

is it possible to create a custom filter that adds custom values to the filtered log entries and view these values for example in a special column in the log entry grid?

Regards
Andreas


LogViewPlus Support
LogViewPlus Support
Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)
Group: Moderators
Posts: 656, Visits: 2K
Hi Andreas,

So, you are looking to enrich the data?

It is technically possible.  You could modify the log entry that is passed into the custom filter, but this would be modifying an existing column rather than creating a new one.

I think a better approach might be to create a custom parser and enrich the data as it is being processed.  This gives you more control over column definitions.

You can find the documentation on custom filters / parsers here:
https://www.logviewplus.com/docs/custom_filters.html
https://www.logviewplus.com/docs/custom_parsers.html

Hope that helps,

Toby
AndreasP
AndreasP
Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)
Group: Forum Members
Posts: 49, Visits: 216
Hi Toby,

what I actually want to do is find places in logs where certain processing steps take too long. I do this by filtering down to log entries that indicate the start and stop of such processing steps and compare the time between those. However if I have many hundreds or more of such entries searching them by hand is not a solution. What makes visual inspection additionally difficult is, that I have to look at every second log entry since the "elapsed" value of the start event is the time since the last stop (which I'm not interested in).

So I was thinking if I can write a custom filter for this. The idea was to filter on the stop events and add the time difference to the (no longer shown) start event to a special column. At least this way I would only have the interesting duration values in the list. Maybe sorting would also work (but I only want to sort the result list, and not the original list - I think this is also not possible). However this does not seem to work since I don't have a suitable unused column.

So the next idea was to write a custom filter. Basically the searching works, but now I wonder how do I tell the analyzer which ones are the start events and which ones are the stop events in a general way without hard-coding them. I probably could enter them manually in a custom input dialog, which is again a little bit cumbersome (especially since I can't use copy and paste from the LogViewPlus windows since it is blocked while the input dialog is open.

So currently I wonder if it is possible to read out the currently selected (multiple) log entries in the log entry grid. So I could select a start and stop entry and use the messages as default values in my input dialog for the custom analyzer.
Or is it possible to access for example the current list of highlights or filters?
Or any other ideas?

Looking forward to your input.

Regards
Andreas
AndreasP
AndreasP
Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)
Group: Forum Members
Posts: 49, Visits: 216
One additional question. Is it possible to store configuration settings in custom analyzers? I would store the start/stop configuration settings from former calls and use these as kind of history for next calls to the analyzer. So I would have to enter the settings manually only once. Or even store a list of common start/stop filters.
LogViewPlus Support
LogViewPlus Support
Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)
Group: Moderators
Posts: 656, Visits: 2K
Hi Andreas,

It makes sense what you are trying to do.  It is possible this could be flushed out into a new application feature, but I think it needs more thought at this stage.  Hmmm....  For now, I think your best option might be to filter your log entries down as best you can and then export to Excel or a CSV file for further analysis.

Have you tried sorting by the Elapsed column?  This may not meet your requirements - but I think it will help.

There is no way to access LogViewPlus settings from a custom analyzer, but there is nothing to stop you from reading and writing to the file system or the registry.  You should be able to manage your own component settings.

Hope that helps,

Toby
AndreasP
AndreasP
Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)Junior Member (64 reputation)
Group: Forum Members
Posts: 49, Visits: 216
Hi Toby,

just wanted to let you know, that I now have implemented a custom analyzer that opens a non blocking dialog. So I can copy and paste search strings from the LogViewPlus window to the plugin window. Additionally I save the last search entries to the registry as suggested by you. Think I can live with that solution. Thanks!

Just a side note. Changing back the focus from the LogViewPlus window to the plugin window (with ALT+TAB) somehow does not always work well in combination with ILogViewer.FindLogEntry. There are cases when the focus is not changed and cases where there is a few seconds delay until the plugin windows appears.

Regards
Andreas
LogViewPlus Support
LogViewPlus Support
Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)
Group: Moderators
Posts: 656, Visits: 2K
Thanks for the update Andreas - glad to hear you found a solution!

It is difficult for me to comment on the focus / delay issue as custom code is involved.  I also have no way to recreate the issue.  If you want to send me your code, I am happy to take a look.  You can contact me privately using this form: https://www.logviewplus.com/contact.aspx

Thanks,

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