# @lightsource/log

> Class for console logging with multiple levels

Latest version **3.0.4** (published 2021-09-19) · GPL-2.0-only license · 0 weekly downloads

## Install

```sh
npm install @lightsource/log
pnpm add @lightsource/log
yarn add @lightsource/log
bun add @lightsource/log
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.4 |
| Published | 2021-09-19 |
| First published | 2020-06-06 |
| Weekly downloads | 0 |
| License | GPL-2.0-only |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 22.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | LightSource |
| Maintainers | lightsource |
| Keywords | logging, log, console, multi-level |

## Links

- npm: https://www.npmjs.com/package/@lightsource/log
- Repository: https://gitlab.com/lightsource/log-js
- Issues: https://gitlab.com/lightsource/log-js/-/issues
- npm.io page: https://npm.io/package/@lightsource/log

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 3.0.4 (latest) — 2021-09-19
- 3.0.3 — 2021-06-25
- 3.0.2 — 2021-06-25
- 3.0.0 — 2021-06-25
- 2.0.5 — 2020-11-08
- 2.0.4 — 2020-06-07
- 2.0.3 — 2020-06-07
- 2.0.2 — 2020-06-07
- 2.0.1 — 2020-06-07
- 2.0.0 — 2020-06-06
- 1.0.0 — 2020-06-06

## README

# 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" }
```

---
_Source: https://npm.io/package/@lightsource/log · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
