Loupe - Log - Monitor - Resolve
Loupe.Extensibility Namespace / ILog Interface / Write Method
The log message severity.
The number of stack frames to skip back over to determine the original caller. (0 means the immediate caller of this method; 1 means their immediate caller, and so on.)
An Exception object to attach to this log message.
An XML document (as a string) with extended details about the message. (May be null.)
The application subsystem or logging category that the log message is associated with, which supports a dot-delimited hierarchy.
A simple single-line message caption. (Will not be processed for formatting.)
Additional multi-line descriptive message (or may be null) which can be a format string followed by corresponding arguments.
A variable number of arguments referenced by the formatted description string (or no arguments to skip formatting).

In This Topic
    Write Method (ILog)
    In This Topic
    Write a complete log message directly to the Loupe log from a wrapper method or bridging logic, attributing the source of the message farther up the call-stack.
    Syntax
    'Declaration
     
    
    Sub Write( _
       ByVal severity As LogMessageSeverity, _
       ByVal skipFrames As Integer, _
       ByVal exception As Exception, _
       ByVal detailsXml As String, _
       ByVal category As String, _
       ByVal caption As String, _
       ByVal description As String, _
       ByVal ParamArray args() As Object _
    ) 

    Parameters

    severity
    The log message severity.
    skipFrames
    The number of stack frames to skip back over to determine the original caller. (0 means the immediate caller of this method; 1 means their immediate caller, and so on.)
    exception
    An Exception object to attach to this log message.
    detailsXml
    An XML document (as a string) with extended details about the message. (May be null.)
    category
    The application subsystem or logging category that the log message is associated with, which supports a dot-delimited hierarchy.
    caption
    A simple single-line message caption. (Will not be processed for formatting.)
    description
    Additional multi-line descriptive message (or may be null) which can be a format string followed by corresponding arguments.
    args
    A variable number of arguments referenced by the formatted description string (or no arguments to skip formatting).
    Remarks

    This method provides an advanced use of Loupe log messages for use in wrapper methods and for bridging simple logging systems into Loupe. Also see Verbose and their other overloads and related methods for simpler usage of XML details when the other advanced hooks are not needed.

    This overload of Write() is provided as an API hook for simple wrapping methods which need to attribute a log message to their own outer callers rather than to the direct caller of this method. Passing a skipFrames of 0 would designate the caller of this method as the originator; a skipFrames of 1 would designate the caller of the caller of this method as the originator, and so on. It will then extract information about the originator automatically based on the indicated stack frame.

    This method also allows an optional Exception object to be attached to the log message (null for none). It can also include an optional XML document (as a string, or null for none) containing extended details about the message.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also