Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Monitor 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 Gibraltar log 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 log messages. All log messages submitted after this call will block the submitting thread until they are committed to disk, so that any foreground thread still logging final items will be sure to get them through before they exit. This is called automatically when an ApplicationExit event is received, and can also be called directly (such as if that event would not function).

    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