Fatal Method
Writes a fatal-level log entry.
Definition
Namespace: GHost.Core.Logging.Context
Type: ILogger
Assembly: GHost.Core.dll
Overloads
| Name | Description |
|---|---|
| Fatal(string) | Writes a fatal log entry. |
| Fatal(Exception) | Writes a fatal log entry for an exception. |
| Fatal(ILogContext, Exception) | Writes a fatal log entry for an exception with context. |
| Fatal(string, Exception) | Writes a fatal log entry with a log code and exception. |
| Fatal(string, string, object[]) | Writes a formatted fatal log entry with a log code. |
| Fatal(string, Exception, string, object[]) | Writes a formatted fatal log entry with a log code and exception. |
| Fatal(string, ILogContext, Exception) | Writes a fatal log entry with a log code, context, and exception. |
| Fatal(string, ILogContext, string, object[]) | Writes a formatted fatal log entry with a log code and context. |
| Fatal(string, ILogContext, Exception, string, object[]) | Writes a formatted fatal log entry with a log code, context, and exception. |
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.
Fatal(string message)
Writes a fatal log entry with the specified message.
void Fatal(string message);
Parameters
message – The log message.
Fatal(Exception ex)
Writes a fatal log entry for the specified exception.
void Fatal(Exception ex);
Parameters
ex – The exception to log.
Fatal(ILogContext context, Exception ex)
Writes a fatal log entry for the specified exception and context.
void Fatal(ILogContext context, Exception ex);
Parameters
context – An ILogContext instance to provide an additional log context to the log entry.
ex – The exception to log.
Fatal(string code, Exception ex)
Writes a fatal log entry with a log code and exception.
void Fatal(string code, Exception ex);
Parameters
code – A unique code (mnemonic or otherwise) that identifies the log message.
ex – The exception to log.
Fatal(string code, string message, params object[] args)
Writes a formatted fatal log entry with a log code.
void Fatal(string code, string message, params object[] args);
Parameters
code – A unique code (mnemonic or otherwise) that identifies the log message.
message – A string containing the message and format items to log.
args – A params array of objects that match the format items in the message to provide them with values.
Fatal(string code, Exception ex, string message, params object[] args)
Writes a formatted fatal log entry with a log code and exception.
void Fatal(string code, Exception ex, string message, params object[] args);
Parameters
code – A unique code (mnemonic or otherwise) that identifies the log message.
ex – The exception to log.
message – A string containing the message and format items to log.
args – A params array of objects that match the format items in the message to provide them with values.
Fatal(string code, ILogContext context, Exception ex)
Writes a fatal log entry with a log code, context, and exception.
void Fatal(string code, ILogContext context, Exception ex);
Parameters
code – A unique code (mnemonic or otherwise) that identifies the log message.
context – An ILogContext instance to provide an additional log context to the log entry.
ex – The exception to log.
Fatal(string code, ILogContext context, string message, params object[] args)
Writes a formatted fatal log entry with a log code and context.
void Fatal(string code, ILogContext context, string message, params object[] args);
Parameters
code – A unique code (mnemonic or otherwise) that identifies the log message.
context – An ILogContext instance to provide an additional log context to the log entry.
message – A string containing the message and format items to log.
args – A params array of objects that match the format items in the message to provide them with values.
Fatal(string code, ILogContext context, Exception ex, string message, params object[] args)
Writes a formatted fatal log entry with a log code, context, and exception.
void Fatal(string code, ILogContext context, Exception ex, string message, params object[] args);
Parameters
code – A unique code (mnemonic or otherwise) that identifies the log message.
context – An ILogContext instance to provide an additional log context to the log entry.
ex – The exception to log.
message – A string containing the message and format items to log.
args – A params array of objects that match the format items in the message to provide them with values.