Class: Logger

logger~Logger(optsopt) → {Logger}

new Logger(optsopt) → {Logger}

A Logger with colored output.

Parameters:
Name Type Attributes Description
opts Object <optional>

Optional arguments for console.Console.

Properties
Name Type Attributes Default Description
debug Boolean <optional>
false

Enable debug output.

color Boolean <optional>
true

Enable colored output.

stdout Object <optional>
process.stdout
stderr Object <optional>
process.stderr
Source:
Returns:
Type
Logger

Extends

  • console.Console

Methods

blue(str) → {String}

Parameters:
Name Type Description
str String
Source:
Returns:
Type
String

cyan(str) → {String}

Parameters:
Name Type Description
str String
Source:
Returns:
Type
String

debug(…strs)

Parameters:
Name Type Attributes Description
strs * <repeatable>
Source:

error(…strs)

Parameters:
Name Type Attributes Description
strs * <repeatable>
Source:

green(str) → {String}

Parameters:
Name Type Description
str String
Source:
Returns:
Type
String

info(…strs)

Parameters:
Name Type Attributes Description
strs * <repeatable>
Source:

log(…strs)

Parameters:
Name Type Attributes Description
strs * <repeatable>
Source:

red(str) → {String}

Parameters:
Name Type Description
str String
Source:
Returns:
Type
String

warn(…strs)

Parameters:
Name Type Attributes Description
strs * <repeatable>
Source:

yellow(str) → {String}

Parameters:
Name Type Description
str String
Source:
Returns:
Type
String