Home Manual Reference Source Test
public class | source

Logger

A logger used in all console outputs. Should never be instantiated. Log levels, --silent-flags etc. are handled automatically by gulplog.

Test:

Static Member Summary

Static Public Members
public static get

An instance of chalk.

public static get

An instance of LogFormat.

public static get

The prefix added to each log.

public static get

The log types available.

Static Private Members
private static

The log types handled.

Static Method Summary

Static Public Methods
public static

applyOptions(options: Object)

Apply options to the logger.

public static

debug(message: ...string)

Print debug messages.

public static

error(message: ...string)

Print error messages.

public static

info(message: ...string)

Print regular logs.

public static

Pipes a readable stream and logs the last line of each chunk processed.

public static

warn(message: ...string)

Print warnings.

Static Public Members

public static get colors: chalk source

An instance of chalk.

public static get format: LogFormat source

An instance of LogFormat.

public static get prefix: string source

The prefix added to each log. Should always equal fancy-log's prefix.

See:

public static get types: string[] source

The log types available.

Static Private Members

private static _handled: Map<String, Boolean> source

The log types handled.

Static Public Methods

public static applyOptions(options: Object) source

Apply options to the logger. Should only be called once..

Params:

NameTypeAttributeDescription
options Object

Options passed to gulplog.

Test:

public static debug(message: ...string) source

Print debug messages.

Params:

NameTypeAttributeDescription
message ...string

The message(s) to print.

Test:

public static error(message: ...string) source

Print error messages.

Params:

NameTypeAttributeDescription
message ...string

The message(s) to print.

public static info(message: ...string) source

Print regular logs.

Params:

NameTypeAttributeDescription
message ...string

The message(s) to print.

Test:

public static pipeLastLine(stream: node.stream.Readable) source

Pipes a readable stream and logs the last line of each chunk processed.

Params:

NameTypeAttributeDescription
stream node.stream.Readable

The stream to pipe.

Test:

public static warn(message: ...string) source

Print warnings.

Params:

NameTypeAttributeDescription
message ...string

The message(s) to print.

Test: