nx.js
Classes

Console

Constructors

new Console()

new Console(opts): Console

Parameters

ParameterType
optsPartial<ConsoleOptions>

Returns

Console

Methods

debug()

debug(...input): void

Writes the formatted input to the debug log file.

Tip

This function does not invoke text rendering mode, so it can safely be used when rendering with the Canvas API.

Parameters

ParameterType
...inputunknown[]

Returns

void


error()

error(...input): void

Logs the formatted input to the screen as red text.

Parameters

ParameterType
...inputunknown[]

Returns

void


log()

log(...input): void

Logs the formatted input to the screen as white text.

Parameters

ParameterType
...inputunknown[]

Returns

void


print()

print(s): void

Prints string s to the console on the screen, without any formatting applied. Newline is not appending to the end of the string.

Parameters

ParameterTypeDescription
sstringThe text to print to the console.

Returns

void


printErr()

printErr(s): void

Prints string s to the debug log file, without any formatting applied. Newline is not appending to the end of the string.

Tip

This function does not invoke text rendering mode, so it can safely be used when rendering with the Canvas API.

Parameters

ParameterTypeDescription
sstringThe text to print to the log file.

Returns

void


trace()

trace(...input): void

Logs the formatted input to the screen as white text, including a stack trace of where the function was invoked.

Parameters

ParameterType
...inputunknown[]

Returns

void


warn()

warn(...input): void

Logs the formatted input to the screen as yellow text.

Parameters

ParameterType
...inputunknown[]

Returns

void

On this page