Input Format Objects

Log Parser

Input Format Objects

Input Format objects provide programmatic access to the input formats supported by Log Parser.

Input Format objects are instantiated with the ProgId and the .NET COM wrapper class names specified in the following table:

Input Format ProgId .NET COM Wrapper Class Name
ADS MSUtil.LogQuery.ADSInputFormat COMADSInputContextClassClass
BIN MSUtil.LogQuery.IISBINInputFormat COMIISBINInputContextClassClass
CSV MSUtil.LogQuery.CSVInputFormat COMCSVInputContextClassClass
ETW MSUtil.LogQuery.ETWInputFormat COMETWInputContextClassClass
EVT MSUtil.LogQuery.EventLogInputFormat COMEventLogInputContextClassClass
FS MSUtil.LogQuery.FileSystemInputFormat COMFileSystemInputContextClassClass
HTTPERR MSUtil.LogQuery.HttpErrorInputFormat COMHttpErrorInputContextClassClass
IIS MSUtil.LogQuery.IISIISInputFormat COMIISIISInputContextClassClass
IISODBC MSUtil.LogQuery.IISODBCInputFormat COMIISODBCInputContextClassClass
IISW3C MSUtil.LogQuery.IISW3CInputFormat COMIISW3CInputContextClassClass
NCSA MSUtil.LogQuery.IISNCSAInputFormat COMIISNCSAInputContextClassClass
NETMON MSUtil.LogQuery.NetMonInputFormat COMNetMonInputContextClassClass
REG MSUtil.LogQuery.RegistryInputFormat COMRegistryInputContextClassClass
TEXTLINE MSUtil.LogQuery.TextLineInputFormat COMTextLineInputContextClassClass
TEXTWORD MSUtil.LogQuery.TextWordInputFormat COMTextWordInputContextClassClass
TSV MSUtil.LogQuery.TSVInputFormat COMTSVInputContextClassClass
URLSCAN MSUtil.LogQuery.URLScanLogInputFormat COMURLScanLogInputContextClassClass
W3C MSUtil.LogQuery.W3CInputFormat COMW3CInputContextClassClass
XML MSUtil.LogQuery.XMLInputFormat COMXMLInputContextClassClass

After instantiating an input format object, an application can set the input format parameters and use the object as an argument to the Execute or ExecuteBatch methods of the LogQuery object.

Methods

The Input Format objects do not expose methods.


Properties

The Input Format objects expose read/write properties with the same names and capitalization as the parameters accepted by the corresponding Log Parser input format.
For example, the MSUtil.LogQuery.EventLogInputFormat input format object exposes a "resolveSIDs" property that controls the resolveSIDs parameter of the EVT input format.
The value type accepted and returned by an input format object property depends on the nature of the values that can be specified for the input format parameter, as described by the following table:
Parameter values Property value type JScript Example
"ON"/"OFF" values Boolean oEVTInputFormat.resolveSIDs = true;
Enumeration values (e.g. "ASC"/"PRINT"/"HEX") String oEVTInputFormat.binaryFormat = "PRINT";
String values String oEVTInputFormat.stringsSep = ", ";
Numeric values Number oIISW3CInputFormat.recurse = 10;
For more information on Input Format Parameters, see the Input Formats Reference.


Examples

JScript example:

var oLogQuery = new ActiveXObject("MSUtil.LogQuery");

// Create EVT Input Format object
var oEVTInputFormat = new ActiveXObject("MSUtil.LogQuery.EventLogInputFormat");

// Set input format parameters
oEVTInputFormat.resolveSIDs = true;
oEVTInputFormat.binaryFormat = "PRINT";
oEVTInputFormat.stringsSep = ", ";
oEVTInputFormat.iCheckpoint = "MyCheckpoint.lpc";

// Create query text
var strQuery = "SELECT * FROM System";

// Execute query and receive a LogRecordSet
var oRecordSet = oLogQuery.Execute( strQuery, oEVTInputFormat );

VBScript example:

Dim oLogQuery
Dim oEVTInputFormat
Dim strQuery
Dim oRecordSet

Set oLogQuery = CreateObject("MSUtil.LogQuery")

' Create EVT Input Format object
Set oEVTInputFormat = CreateObject("MSUtil.LogQuery.EventLogInputFormat")

' Set input format parameters
oEVTInputFormat.resolveSIDs = True
oEVTInputFormat.binaryFormat = "PRINT"
oEVTInputFormat.stringsSep = ", "
oEVTInputFormat.iCheckpoint = "MyCheckpoint.lpc"

' Create query text
strQuery = "SELECT * FROM System"

' Execute query and receive a LogRecordSet
Set oRecordSet = oLogQuery.Execute ( strQuery, oEVTInputFormat )


See also:

LogQuery Object
Output Format Objects
Log Parser COM API Overview
C# Example


© 2004 Microsoft Corporation. All rights reserved.