Returns a bundled collection of loggers
const con = logSet(`a`);con.log(`Hello`); // console.log(`a Hello`);con.warn(`Uh-oh`); // console.warn(`a Uh-oh`);con.error(`Eek!`); // console.error(`a Eek!`); Copy
const con = logSet(`a`);con.log(`Hello`); // console.log(`a Hello`);con.warn(`Uh-oh`); // console.warn(`a Uh-oh`);con.error(`Eek!`); // console.error(`a Eek!`);
By default each prefix is assigned a colour. To use another logic, provide the colourKey parameter.
colourKey
// Both set of loggers will use same colourconst con = logSet(`a`, true, `system`);const con2 = logSet(`b`, true, `system`); Copy
// Both set of loggers will use same colourconst con = logSet(`a`, true, `system`);const con2 = logSet(`b`, true, `system`);
Prefix for log messages
True by default. If false, log() messages are a no-op
Optional
If specified, log messages will be coloured by this key instead of prefix (default)
Returns a bundled collection of loggers
By default each prefix is assigned a colour. To use another logic, provide the
colourKey
parameter.