Summary
Writes an error message to the log using the specified format information.
- Namespace
- Cake
.Common .Diagnostics - Containing Type
- LoggingAliases
Syntax
[CakeMethodAlias]
[CakeAliasCategory("Error")]
public static void Error(this ICakeContext context, FormattableLogAction formattableLogAction)
Examples
Error(logAction => logAction($"Hello {"World"}! Today is an {DateTime.Now:dddd}"));
Attributes
| Type | Description |
|---|---|
| Cake |
An attribute used to mark script method aliases. |
| Cake |
An attribute used for documentation of alias methods/properties. |
Parameters
| Name | Type | Description |
|---|---|---|
| context | ICakeContext | The context. |
| formattableLogAction | FormattableLogAction | The log action. |
Return Value
| Type | Description |
|---|---|
| void |
