Loupe - Log - Monitor - Resolve
Gibraltar Namespace / CommonCentralLogic Class / FindMessageSource Method
The number of stack frames to skip over to find the first candidate to be identified as the source of the log message. (Should generally use 0 if exception parameter is not null.)
True if logging a message originating in Gibraltar code (or to just trust skipFrames). False if logging a message from the client application and Gibraltar frames should be explicitly skipped over.
An exception declared as the source of this log message (or null for normal call stack source).
The class name of the identified source (usually available).
The method name of the identified source (usually available).
The file name of the identified source (if available).
The line number of the identified source (if available).

In This Topic
    FindMessageSource Method
    In This Topic
    Extracts needed message source information from the current call stack.
    Syntax
    'Declaration
     
    
    Public Shared Function FindMessageSource( _
       ByVal skipFrames As Integer, _
       ByVal trustSkipFrames As Boolean, _
       ByVal exception As Exception, _
       ByRef className As String, _
       ByRef methodName As String, _
       ByRef fileName As String, _
       ByRef lineNumber As Integer _
    ) As Integer

    Parameters

    skipFrames
    The number of stack frames to skip over to find the first candidate to be identified as the source of the log message. (Should generally use 0 if exception parameter is not null.)
    trustSkipFrames
    True if logging a message originating in Gibraltar code (or to just trust skipFrames). False if logging a message from the client application and Gibraltar frames should be explicitly skipped over.
    exception
    An exception declared as the source of this log message (or null for normal call stack source).
    className
    The class name of the identified source (usually available).
    methodName
    The method name of the identified source (usually available).
    fileName
    The file name of the identified source (if available).
    lineNumber
    The line number of the identified source (if available).

    Return Value

    The index of the stack frame chosen
    Remarks
    This is used internally to perform the actual stack frame walk. Constructors for derived classes all call this method. This constructor also allows the caller to specify a log message as being of local origin, so Gibraltar stack frames will not be automatically skipped over when determining the originator for internally-issued log messages.
    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