Class Logger
Provides methods for capturing application trace messages.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Diagnostics
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public static class Logger
Properties
TraceSourceName
Gets or sets the trace source name that is used to write trace messages.
Declaration
public static string TraceSourceName { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
ShouldLog(TraceEventType)
Returns flag indicating that provided event type will or will not be recorded according to current tracing configuration.
Declaration
public static bool ShouldLog(TraceEventType eventType)
Parameters
Type | Name | Description |
---|---|---|
TraceEventType | eventType | Trace event type of the message that is about to be recorded. |
Returns
Type | Description |
---|---|
Boolean | True, if provided event type will be recorded. False, if provided event type will NOT be recorded. |
Write(TraceEventType, Exception, String, Object[])
Record provided trace message according to current tracing configuration.
Declaration
public static void Write(TraceEventType eventType, Exception exception, string message, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
TraceEventType | eventType | Trace event type of the message that needs to be recorded. |
Exception | exception | Exception that needs to be serialized and recorded along with the trace message (optional). |
String | message | Trace message that needs to be recorded. Message can be composite format string. |
Object[] | args | Array containing zero or more objects to format according to the message format string. |
Write(TraceEventType, String, Object[])
Record provided trace message according to current tracing configuration.
Declaration
public static void Write(TraceEventType eventType, string message, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
TraceEventType | eventType | Trace event type of the message that needs to be recorded. |
String | message | Trace message that needs to be recorded. Message can be composite format string. |
Object[] | args | Array containing zero or more objects to format according to the message format string. |