Running the Samples

When learning to create custom filters and parsers for LogViewPlus it is helpful to begin with the sample code projects. There are four projects included in the sample code - a custom filter, custom parser, custom post processor and a custom reader. All of these implementations are kept intentionally simple. They serve an instructive rather than functional purpose.

The purpose of this tutorial is to get you up and running with the sample projects using Visual Studio.

To get started please download the sample projects and extract the zip file into a working directory. Open LogViewPlus_Samples.sln in Visual Studio. Once the solution is opened you should notice two projects: CustomFilter and CustomParser.

Before we build projects there's a few things we need to do. First open LogViewPlus and go to Settings -> Application -> Plugins and ensure that the "allow custom plugins" option is enabled.

As a security feature, LogViewPlus will not check for extensions unless these items are enabled. Once they are enabled please close all running instances of LogViewPlus.

Returning to Visual Studio there's a few more things we need to check before we build our project. First, for each project go to Properties -> Build Events. Both projects should have build events that copy the output of the build to the %AppData%\LogViewPlus\Plugins directory.

We also need to check that Properties -> Debug -> Start Action is set to run an external program. The plug-ins need to run inside of a LogViewPlus instance, so this should point to your LogViewPlus install directory.

Were now ready to build our solution. When you build the solution both of these projects will be built and the output would be saved to %AppData%\LogViewPlus\Plugins. This is the default directory where LogViewPlus expects plug-ins to be installed. When you run your project, Visual Studio will automatically start LogViewPlus in a debugger and you will be able to debug your plug-ins as expected.

Once LogViewPlus starts you will be able to confirm that your plug-ins are loaded successfully by going to Settings -> Application -> Plugins. Two plug-ins should be listed similar to the screenshot below.

Please see the following sections for more information on creating custom filters and custom parsers.

< >