Click or drag to resize

LogEventHandler Delegate

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
A delegate that consumes log events.

Namespace:  Telogis.GeoBase.Diagnostics
Assembly:  geobase.net (in geobase.net.dll) Version: 4.87.0.0
Syntax
public delegate void LogEventHandler(
	LogEntry ev
)

Parameters

ev
Type: Telogis.GeoBase.DiagnosticsLogEntry
A log event.
Examples
C#
class MyLogClass
{
    static void Main() {
        // Use LogEventHandler to handle log events.
        Log.LogEvent += new LogEventHandler(Log_LogEvent);
        // Create the log type and content.
        Log.Info("Message is {0}", "Hello World");
        Console.ReadKey();
    }
    public static void Log_LogEvent(LogEntry ev) {
        // Write out the log entry to the console.
        // use StreamWriter to save to file
        System.Console.Out.WriteLine("Log message: " + ev.Message);
    }
}
See Also