ProcessLogFileName Method

Reads and summarizes an MTA log specified by filename.

Syntax

obj.ProcessLogFileName(MTALogFileName String)
where obj is an McExchg.MTALogAnalyzer object.

Parameters

MTALogFileName Specifies the full path to the MTA log file to process.

Return Type

Boolean.

Example

To get the MTA log top 100 SMTP Out Sender log summary results for the C:\Exchange\tracking.log\19991231.log log file from the EXCHSERVER1 Exchange server using the George mailbox, enter:

Const PI_MTA_SMTP_OUT_SENDER = 1001
Set obj = CreateObject("McExchg.MTALogAnalyzer")
If obj.LogonToMAPI("EXCHSERVER1", "George") Then
If obj.ProcessLogFileName("C:\Exchange\tracking.log\19991231.log") Then
If obj.LogSummary(PI_MTA_SMTP_OUT_SENDER, varData, lngRowCount, 100) Then
For lngIndex = 0 to lngRowCount - 1
strObject = varData(0, lngIndex)
lngMsgCount = varData(1, lngIndex)
lngMB = varData(2, lngIndex)
' Do something with summary information
Next
Else
strError = obj.GetError()
End If
Else
strError = obj.GetError()
End If

Else
strError = obj.GetError()
End If

This example show how to retrieve MTA log summary information for a specific MTA log file from an Exchange server.