IWMSLoggingAdmin Object (Visual Basic .NET)

The IWMSLoggingAdmin object is exposed by the WMS Client Logging plug-in, an event plug-in that listens for a log event and saves information gathered from that event to a log file. The logging plug-in can be installed in the namespace of both the server and a specific publishing point. Instances of the plug-in at the server level receive all notifications on all requested events. Instances of the plug-in at the publishing point level only receive events that are related to the specific publishing point.

The IWMSLoggingAdmin object exposes the following properties and methods.

Property

Description

CurrentLogFileName

Retrieves the name of the current log file.

Cycle

Retrieves an enumeration value indicating how often the log file cycles.

Dirty

Retrieves a Boolean value indicating whether the currently running configuration is different from the stored configuration.

FreeSpaceQuota

Specifies and retrieves the minimum amount of disk space that must remain after data has been written to a log file.

LoggedEvents

Retrieves an enumeration value indicating the type of transmission for which events are logged.

MaxSize

Retrieves the maximum permitted size of the log file.

RoleFilter

Specifies a filter value for logging events with a specific role attribute.

Template

Retrieves the log file template path.

UseBuffering

Retrieves a Boolean value that indicates whether logging data is buffered before it is flushed to the log file.

UseLocalTime

Specifies a Boolean value indicating whether local times are recorded in the log file.

UseUnicode

Specifies a Boolean value indicating whether the log file contains Unicode or ANSI text.

V4Compat

Specifies a Boolean value indicating whether log files are created in a format compatible with previous versions of Windows Media Services.

Method

Description

CycleNow

Forces a log file cycle.

ExpandTemplate

Retrieves the expanded path of a template.

Flush

Flushes the buffer to the log file.

IsPathValid

Validates the path to the log file.

Example

The following example illustrates how to retrieve an IWMSLoggingAdmin object.

Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices

Private Sub RetrieveObj()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Plugin As IWMSPlugin
    Dim LogAdmin As IWMSLoggingAdmin

Try
    ' Create the WMSServer object.
    Server = New WMSServer()

    ' Retrieve the plug-in to be configured.
    Plugin = Server.EventHandlers.Item("WMS Client Logging")

    ' Retrieve the custom interface of the plug-in.
    LogAdmin = Plugin.CustomInterface

Catch excCom As COMException
    ' TODO: Handle COM exceptions.
Catch exc As Exception
    ' TODO: Handle errors.
Finally
    ' TODO: Clean-up code goes here.
End Try

End Sub

See Also

Concepts

System Plug-ins (Visual Basic .NET)