Warn
Warn Method
Writes a warning-level log entry.
Definition
Namespace: GHost.Core.Logging.Context
Assembly: GHost.Core.dll
Overloads
| Name | Description |
|---|---|
| Warn(string) | Writes a warning log entry. |
| Warn(string, string, object[]) | Writes a formatted warning log entry with a log code. |
| Warn(string, ILogContext, string, object[]) | Writes a formatted warning 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.
Warn(string message)
Writes a warning log entry with the specified message.
void Warn(string message);
Parameters
message string
The log message.
Warn(string code, string message, params object[] args)
Writes a formatted warning log entry with a log code.
void Warn(string code, string message, params object[] args);
Parameters
code string
A unique code (mnemonic or otherwise) that identifies the log message.
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.
Warn(string code, ILogContext context, string message, params object[] args)
Writes a formatted warning log entry with a log code and context.
void Warn(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.