Variable: log
constlog:object
Defined in: index.ts:4
Type Declaration
error
error: {(...
data):void; (message?, ...optionalParams):void; } =console.error
Call Signature
(...
data):void
The console.error() static method outputs a message to the console at the "error" log level. The message is only displayed to the user if the console is configured to display error output. In most cases, the log level is configured within the console UI. The message may be formatted as an error, with red colors and call stack information.
Parameters
| Parameter | Type |
|---|---|
...data | any[] |
Returns
void
Call Signature
(
message?, ...optionalParams):void
Prints to stderr with newline. Multiple arguments can be passed, with the
first used as the primary message and all additional used as substitution
values similar to printf(3)
(the arguments are all passed to util.format()).
const code = 5;
console.error('error #%d', code);
// Prints: error #5, to stderr
console.error('error', code);
// Prints: error 5, to stderr
If formatting elements (e.g. %d) are not found in the first string then
util.inspect() is called on each argument and the
resulting string values are concatenated. See util.format()
for more information.
Parameters
| Parameter | Type |
|---|---|
message? | any |
...optionalParams? | any[] |
Returns
void
Since
v0.1.100
info
info: {(...
data):void; (message?, ...optionalParams):void; } =console.info
Call Signature
(...
data):void
The console.info() static method outputs a message to the console at the "info" log level. The message is only displayed to the user if the console is configured to display info output. In most cases, the log level is configured within the console UI. The message may receive special formatting, such as a small "i" icon next to it.
Parameters
| Parameter | Type |
|---|---|
...data | any[] |
Returns
void
Call Signature
(
message?, ...optionalParams):void
The console.info() function is an alias for log.
Parameters
| Parameter | Type |
|---|---|
message? | any |
...optionalParams? | any[] |
Returns
void
Since
v0.1.100
warn
warn: {(...
data):void; (message?, ...optionalParams):void; } =console.warn
Call Signature
(...
data):void
The console.warn() static method outputs a warning message to the console at the "warning" log level. The message is only displayed to the user if the console is configured to display warning output. In most cases, the log level is configured within the console UI. The message may receive special formatting, such as yellow colors and a warning icon.
Parameters
| Parameter | Type |
|---|---|
...data | any[] |
Returns
void
Call Signature
(
message?, ...optionalParams):void
The console.warn() function is an alias for error.
Parameters
| Parameter | Type |
|---|---|
message? | any |
...optionalParams? | any[] |
Returns
void
Since
v0.1.100