Loupe - Log - Monitor - Resolve
Gibraltar.Agent.Windows Namespace / LiveLogViewer Class
Members

In This Topic
    LiveLogViewer Class
    In This Topic
    A real time viewer of log messages for the current application.
    Syntax
    'Declaration
     
    
    <DefaultPropertyAttribute("UnhandledExceptionBehavior")>
    <DefaultEventAttribute("MessageChanged")>
    <DesignerAttribute("System.Windows.Forms.Design.UserControlDocumentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", System.ComponentModel.Design.IRootDesigner)>
    <DesignerCategoryAttribute("UserControl")>
    <DesignerSerializerAttribute("System.Windows.Forms.Design.ControlCodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>
    <ToolboxItemFilterAttribute("System.Windows.Forms")>
    Public NotInheritable Class LiveLogViewer 
       Inherits System.Windows.Forms.UserControl
    [DefaultProperty("UnhandledExceptionBehavior")]
    [DefaultEvent("MessageChanged")]
    [Designer("System.Windows.Forms.Design.UserControlDocumentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", System.ComponentModel.Design.IRootDesigner)]
    [DesignerCategory("UserControl")]
    [DesignerSerializer("System.Windows.Forms.Design.ControlCodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [ToolboxItemFilter("System.Windows.Forms")]
    public sealed class LiveLogViewer : System.Windows.Forms.UserControl 
    Remarks

    The LiveLogViewer control can be used to place a real-time log viewer anywhere in your application. You can have multiple log viewers active at the same time. Each viewer will display all of the messages of your application that are recorded after the viewer is created. Once the number of messages in a viewer reaches the MaxMessages count, the oldest messages will be dropped.

    When a LiveLogViewer control initializes it will ensure that the Loupe Agent is fully initialized. By default, this means the first time a viewer control activates in your application the Agent will start monitoring for log messages from Trace, Debug, the Console, and performance metrics for your application.

    Unlike the Loupe Live Viewer, the LiveLogViewer control runs on the same thread as your user interface so it will not display updates if your user interface is blocked in a long running background operation. The Loupe Live Viewer (accessed through a hot key, by default Ctrl-Alt-F5) has its own threads and will continue to display messages even if your user interface thread is tied up performing work.

    Status Bar Updates

    The LiveLogViewer is designed to integrate with your application status bar through its MessageChanged event. Subscribe to this event and send messages to your status bar to have important application messages be displayed in the status bar, even if the LiveLogViewer control is hidden.

    Inheritance Hierarchy

    System.Object
       System.MarshalByRefObject
          System.ComponentModel.Component
             System.Windows.Forms.Control
                System.Windows.Forms.ScrollableControl
                   System.Windows.Forms.ContainerControl
                      System.Windows.Forms.UserControl
                         Gibraltar.Agent.Windows.LiveLogViewer

    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