Interface CommonLogging

Grunt output should look consistent, and maybe even pretty. As such, there is a plethora of logging methods, and a few useful patterns. All of the methods that actually log something are chainable.

Hierarchy

Index

Methods

Methods

public error(msg: string): T in grunt.log.CommonLogging<T>

If msg string is omitted, logs ERROR in red, otherwise logs >> msg, with trailing newline.

Parameters

  • msg: string

Returns

T in grunt.log.CommonLogging<T>

public errorlns(msg: string): T in grunt.log.CommonLogging<T>

Log an error with grunt.log.error, wrapping text to 80 columns using grunt.log.wraptext.

Parameters

  • msg: string

Returns

T in grunt.log.CommonLogging<T>

public ok(msg: string): T in grunt.log.CommonLogging<T>

If msg string is omitted, logs OK in green, otherwise logs >> msg, with trailing newline.

Parameters

  • msg: string

Returns

T in grunt.log.CommonLogging<T>

public oklns(msg: string): T in grunt.log.CommonLogging<T>

Log an ok message with grunt.log.ok, wrapping text to 80 columns using grunt.log.wraptext.

Parameters

  • msg: string

Returns

T in grunt.log.CommonLogging<T>

public subhead(msg: string): T in grunt.log.CommonLogging<T>

Log the specified msg string in bold, with trailing newline.

Parameters

  • msg: string

Returns

T in grunt.log.CommonLogging<T>

public write(msg: string): T in grunt.log.CommonLogging<T>

Log the specified msg string, with no trailing newline.

Parameters

  • msg: string

Returns

T in grunt.log.CommonLogging<T>

public writeflags(obj: any): T in grunt.log.CommonLogging<T>

Log a list of obj properties (good for debugging flags).

Parameters

  • obj: any

Returns

T in grunt.log.CommonLogging<T>

public writeln(msg: string): T in grunt.log.CommonLogging<T>

Log the specified msg string, with trailing newline.

Parameters

  • msg: string

Returns

T in grunt.log.CommonLogging<T>