LogViewPlus Support

Jump to LogEntry in Custom Analyzer

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

By sitob80 - 2 Mar 2020

Hi all,

we have written a custom analyzer that display some useful information to us in a separate window.
What we would like to achieve is that we can double click on a entry in our custom analyzer and the selected LogEntry - we have the logentry instance in the analyzer -  is automatically selected in the current filter view.
Is there any way we can achieve this ? As far as I can see the API of a logentry doesn't provide such functionality or am I wrong here?


Thank you very much for your support
By LogViewPlus Support - 2 Mar 2020

There is currently no way to achieve this, but let me have a think about it and see what we can do in the next release.

Thanks for the suggestion!

Toby
By LogViewPlus Support - 4 Mar 2020

Hi,

I have added a new API to the latest BETA release - v2.4.29.  This version contains a new ILogViewer interface which contains a method FindLogEntry.  Calling this method will find and select the provided log entry.

I have also updated the sample "CustomAnalyzer" project to show how this API is used.  Something like:

var result = MessageBox.Show(owner, $"Would you like to show the largest value?",
      "Average Elapsed", MessageBoxButtons.YesNo,
      MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);

if (result == DialogResult.Yes)
{
  // We can optionally cast the owner to a ILogViewer for additional
  // functionality.
  //
  ((ILogViewer)owner).FindLogEntry(largest);
}


The beta release is available at: https://www.logviewplus.com/download.html

...and the code samples are here:  https://www.logviewplus.com/dist/LogViewPlus_Samples.zip

Hope that helps,

Toby
By sitob80 - 9 Mar 2020

Hi Toby,

just wanted to let you know that your new interface works very well and that up till now it seems to do exactly the things we wanted to do.

Thank you very much for implementing this interface. Hehe
By LogViewPlus Support - 9 Mar 2020

Glad to hear it - thanks for letting me know!

Toby