ILogger.WriteCore Method
Aggregates most logging patterns to a single method. This must be compatible with the Func representation in the OWIN environment. To check IsEnabled call WriteCore with only TraceEventType and check the return value, no event will be written.
Namespace: Microsoft.Owin.Logging
Assembly: Microsoft.Owin (in Microsoft.Owin.dll)
Syntax
'Declaration
Function WriteCore ( _
eventType As TraceEventType, _
eventId As Integer, _
state As Object, _
exception As Exception, _
formatter As Func(Of Object, Exception, String) _
) As Boolean
'Usage
Dim instance As ILogger
Dim eventType As TraceEventType
Dim eventId As Integer
Dim state As Object
Dim exception As Exception
Dim formatter As Func(Of Object, Exception, String)
Dim returnValue As Boolean
returnValue = instance.WriteCore(eventType, _
eventId, state, exception, formatter)
bool WriteCore(
TraceEventType eventType,
int eventId,
Object state,
Exception exception,
Func<Object, Exception, string> formatter
)
bool WriteCore(
TraceEventType eventType,
int eventId,
Object^ state,
Exception^ exception,
Func<Object^, Exception^, String^>^ formatter
)
abstract WriteCore :
eventType:TraceEventType *
eventId:int *
state:Object *
exception:Exception *
formatter:Func<Object, Exception, string> -> bool
function WriteCore(
eventType : TraceEventType,
eventId : int,
state : Object,
exception : Exception,
formatter : Func<Object, Exception, String>
) : boolean
Parameters
- eventType
Type: System.Diagnostics.TraceEventType
The event type.
- eventId
Type: System.Int32
The event identifier.
- state
Type: System.Object
The state of the event.
- exception
Type: System.Exception
The exception.
- formatter
Type: System.Func<Object, Exception, String>
The formatter.
Return Value
Type: System.Boolean
true if the event contains logging patter; otherwise, false.