Loupe - Log - Monitor - Resolve
Gibraltar.Agent Namespace / Log Class / EndSession Method / EndSession(SessionStatus,Int32,String) Method
The explicit ending status to declare for this session, Normal or Crashed.
The number of stack frames to skip out to find the original caller.
A simple reason to declare why the application is ending as Normal or as Crashed, or may be null.

In This Topic
    EndSession(SessionStatus,Int32,String) Method
    In This Topic
    Called at the end of the process execution cycle to indicate that the process shut down normally or explicitly crashed.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Sub EndSession( _
       ByVal endingStatus As SessionStatus, _
       ByVal skipFrames As Integer, _
       ByVal reason As String _
    ) 
    public static void EndSession( 
       SessionStatus endingStatus,
       int skipFrames,
       string reason
    )

    Parameters

    endingStatus
    The explicit ending status to declare for this session, Normal or Crashed.
    skipFrames
    The number of stack frames to skip out to find the original caller.
    reason
    A simple reason to declare why the application is ending as Normal or as Crashed, or may be null.
    Remarks

    This will put the Loupe Agent into an ending state in which it will flush everything still in its queue and then switch to a background thread to process any further messages. All messages submitted after this call will block the submitting thread until they are committed to disk, so that any foreground thread still recording final items will be sure to get them through before they exit.

    In WinForms applications this method is called automatically when an ApplicationExit event is received. It is also called automatically when the Agent is registered as a Trace Listener and Trace.Close is called.

    If EndSession is never called, the log will reflect that the session must have crashed.

    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