LoggingAliases.

Warning(ICakeContext, FormattableString) Method

Summary

Writes an warning message to the log using the specified format information.
Namespace
Cake.Common.Diagnostics
Containing Type
LoggingAliases

Syntax

[CakeMethodAlias]
[CakeAliasCategory("Warning")]
public static void Warning(this ICakeContext context, FormattableString formattable)

Examples

Warning($"Hello {"World"}! Today is an {DateTime.Now:dddd}");

Attributes

Type Description
CakeMethodAliasAttribute An attribute used to mark script method aliases.
CakeAliasCategoryAttribute An attribute used for documentation of alias methods/properties.

Parameters

Name Type Description
context ICakeContext The context.
formattable FormattableString The string to be formatted.

Return Value

Type Description
void