Trace Method
Writes a trace-level log entry.
Definition
Namespace: GHost.Core.Logging.Context
Assembly: GHost.Core.dll
Overloads
| Name | Description |
|---|---|
| Trace(string) | Writes a trace log entry. |
| Trace(string, string, object[]) | Writes a formatted trace log entry with a log code. |
| Trace(string, ILogContext, string, object[]) | Writes a formatted trace log entry with a log code and context. |
Remarks
The overloads of this method that include a code parameter allow you to specify a unique code (mnemonic or otherwise) that identifies the log message. See the Log Codes page for more information on log codes and how to use them effectively.
Trace(string message)
Writes a trace log entry with the specified message.
void Trace(string message);
Parameters
message string
The log message.
Trace(string code, string message, params object[] args)
Writes a formatted trace log entry with a log code.
void Trace(string code, string message, params object[] args);
Parameters
code string
The application-specific log code.
message string
A string containing the message and format items to log.
args object[]
A params array of objects that match the format items in the message to provide them with values.
Trace(string code, ILogContext context, string message, params object[] args)
Writes a formatted trace log entry with a log code and context.
void Trace(string code, ILogContext context, string message, params object[] args);
Parameters
code string
A unique code (mnemonic or otherwise) that identifies the log message.
context ILogContext
An instance to provide an additional log context to the log entry.
message string
A string containing the message and format items to log.
args object[]
A params array of objects that match the format items in the message to provide them with values.