@lightsource/log
TypeScript icon, indicating that this package has built-in type declarations

3.0.4 • Public • Published

Log

What is it

Class for console logging with multiple levels

Installation

yarn add @lightsource/log

OR

npm install @lightsource/log

Example of usage

import Log from '@lightsource/log';

Log.setAppName('Rabbit');
Log.setIsDebugMode(true);
Log.setErrorCallback((level, message, debugArgs) => {
    // TODO
});

Log.write(Log.level.DEBUG, 'My color is a', {name: 'white'});

Example of output

Rabbit : DEBUG : My color is a : 17.3
Object { name: "white" }

Package Sidebar

Install

npm i @lightsource/log

Weekly Downloads

0

Version

3.0.4

License

GPL-2.0-only

Unpacked Size

23.3 kB

Total Files

7

Last publish

Collaborators

  • lightsource