Skip to content

ccusage / logger / log

Variable: log()

ts
const log: {
  (...data): void;
  (message?, ...optionalParams): void;
} = console.log;

Direct console.log function for cases where logger formatting is not desired

Call Signature

ts
(...data): void;

Parameters

ParameterType
...dataany[]

Returns

void

Call Signature

ts
(message?, ...optionalParams?): void;

Prints to stdout 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()).

js
const count = 5;
console.log('count: %d', count);
// Prints: count: 5, to stdout
console.log('count:', count);
// Prints: count: 5, to stdout

See util.format() for more information.

Parameters

ParameterType
message?any
...optionalParams?any[]

Returns

void

Since

v0.1.100

Released under the MIT License.