Examining Universal Driver Logs

 
The Universal Driver can generate log output for every operation (file open, read record, etc.), if desired, to track its behavior.  To enable logging, create a file (using Windows Notepad or any other method) named "LH<version>.LOG" (where <version> is the version number of your Universal Driver – for example, LH47.LOG) in your OpenInsight directory.  The contents of this file are irrelevant (an empty file is fine); the Universal Driver detects the presence of the file, and proceeds to record all its operations in the file (note that any existing file contents are lost).  You can also choose to put the file into your Universal Driver directory, rather than your OpenInsight directory, to record all service operations, by using the name of the service instead (for example, "lh47srvc.log").

After OpenInsight has been closed, the log file can be examined using any plain-text editor, such as Windows Notepad.  Each line of output will contain the operation code and any appropriate details.  The currently defined operation codes include:
 
CF:          Create File
CL:          Clear File
CO:          Control message
CS:          Clear Select
DE:          Delete Record
DF:          Delete File
FC:          Flush Cache
FL:           Flush
GN:          Group Number
LO:           Lock
OP:          Open File
RC:          Record Count
RD:          Read Record
RN:          Readnext
RO:          Read-only Record
SE:          Select File
SG:          Select Group
SN:          Station Number
ST:          Read Statistics
SU:          Set User Lock
UL:          Unlock
VG:          Verify Group
WR:          Write Record

Log files can grow quite large, and it may be difficult to locate the code(s) that are of particular interest.  On versions of Windows that support Powershell, it is possible to create a Powershell script to parse out only the desired operation or operations.  Using Windows Notepad, create a file in your OpenInsight folder to contain the Powershell script (named, for example, "Logfilter.ps1"), with the following contents:

$p = @("OP","RD","LO")
Get-Content '.\lh47.log' | Select-String -Pattern $p -SimpleMatch | Set-Content lh47Filtered.log

This will parse through the input file (lh47.log) for commands that match the specified list ("OP", "RD", and "LO"), and place the lines associated with them into the new output file "lh47Filtered.log".  You may put any desired operations in the initial list (quoted and comma separated), and you may change the output name as desired.  If you are generating the script using a different version of the Universal Driver, and thus have a different log file, update the script as appropriate.

If Powershell has not yet been enabled on your system, right-click and "Run as Administrator" on the Powershell icon.  In Powershell, issue the following command:

Set-ExecutionPolicy Unrestricted

You can then run the filter routine by opening up a DOS cmd prompt in your OpenInsight folder, and issuing the following command:

powershell .\logfilter.ps1

(changing the name from logfilter.ps1 to whatever you named your script).  This should generate the specified "trimmed" output file, which should be easier to examine.

Please remember that, while the logging is enabled, performance of the Universal Driver will be significantly reduced; be sure to remove the LH<version>.LOG file as soon as it is no longer required.

Revelation Conference

The previous Revelation Software Users' Conference was held at the Omni Orlando Resort at Championsgate in Orlando, Florida on April 18-21, 2016.

Click Here

On The Road

Throughout the year Revelation Software attends various multivalue User Conferences as well as our Regional User Group meetings.

Click Here

International Offices

Revelation Software has various International Offices and sales regions located on multiple continents.

Click Here

Featured Clients

Revelation Software's clients are involved in every industry around the world. Here is a sampling of some of our clients and their businesses

Click Here