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.
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; |
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 )
© 2004 Microsoft Corporation. All rights reserved.