TraceLogger.Log Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Log(Exception) |
Logs an error with an exception |
Log(String) |
Logs a message as an information event. |
Log(String, TraceEventType) |
Logs a trace event. |
Log(String, TraceEventType, Exception) |
Logs a trace event with the message and the exception. |
Log(Exception)
Logs an error with an exception
public:
override void Log(Exception ^ exception);
public override void Log(Exception exception);
override this.Log : Exception -> unit
Public Overrides Sub Log (exception As Exception)
Parameters
- exception
- Exception
Specifies the exception object.
Applies to
Log(String)
Logs a message as an information event.
public:
override void Log(System::String ^ message);
public override void Log(string message);
override this.Log : string -> unit
Public Overrides Sub Log (message As String)
Parameters
- message
- String
Specifies the message.
Applies to
Log(String, TraceEventType)
Logs a trace event.
public:
override void Log(System::String ^ message, System::Diagnostics::TraceEventType eventType);
public override void Log(string message, System.Diagnostics.TraceEventType eventType);
override this.Log : string * System.Diagnostics.TraceEventType -> unit
Public Overrides Sub Log (message As String, eventType As TraceEventType)
Parameters
- message
- String
Specifies the message.
- eventType
- TraceEventType
Specifies the event type.
Applies to
Log(String, TraceEventType, Exception)
Logs a trace event with the message and the exception.
public:
override void Log(System::String ^ message, System::Diagnostics::TraceEventType eventType, Exception ^ exception);
public override void Log(string message, System.Diagnostics.TraceEventType eventType, Exception exception);
override this.Log : string * System.Diagnostics.TraceEventType * Exception -> unit
Public Overrides Sub Log (message As String, eventType As TraceEventType, exception As Exception)
Parameters
- message
- String
Specifies the message to be logged.
- eventType
- TraceEventType
Specifies the event type.
- exception
- Exception
Specifies the exception object.