'Declaration
Public Event LiveViewerMessageFilter As Log.MessageFilterEventHandler
public event Log.MessageFilterEventHandler LiveViewerMessageFilter
The event handler receives an argument of type LogMessageFilterEventArgs containing data related to this event. The following LogMessageFilterEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Cancel | Cancel (block) this message from being displayed to users by the (LiveLogViewer) sender of this event. |
Message | A new log message received for possible display by the (LiveLogViewer) sender of this event. |
Each LiveLogViewer instance filters independently with its own event. However, the main Loupe Live Viewer itself (accessible via hotkey unless disabled) is created within the Agent and its control object is not accessible to client code. This static event on the Log class therefore allows clients to bind to the filter on the main Loupe Live Viewer in order to filter the messages it displays to users (e.g. to block sensitive internal data).
The Message property of the event args provides the log message in consideration, and the Cancel property allows the message to be displayed (false, the default) or blocked (true). The sender parameter of the event will be null to signify the main Loupe Live Viewer rather than a client-instantiated LiveLogViewer.
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