LoggingAliases.

QuietVerbosity(ICakeContext) Method

Summary

Sets the log verbosity to quiet and returns a disposable that restores the log verbosity on dispose.
Namespace
Cake.Common.Diagnostics
Containing Type
LoggingAliases

Syntax

[CakeMethodAlias]
[CakeAliasCategory("Verbosity")]
public static IDisposable QuietVerbosity(this ICakeContext context)

Examples

using (QuietVerbosity())
{
    Error("Show me.");
    Warning("Hide me.");
    Information("Hide me.");
    Verbose("Hide me.");
    Debug("Hide me.");
}

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.

Return Value

Type Description
IDisposable A disposable that restores the log verbosity.