Table of Contents

Method GetString

Namespace
Innova.NLogExtensions
Assembly
Innova.NLogExtensions.dll

GetString(LogEventInfo, string)

Gets the string value associated with the specified key from the log event's properties.

public static string GetString(this LogEventInfo logEvent, string key)

Parameters

logEvent LogEventInfo

The log event.

key string

The key of the property.

Returns

string

The string value associated with the key, or null if the key is not found.