# lllog

> A minimal zero-dependency logger

Latest version **1.1.2** (published 2019-08-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install lllog
pnpm add lllog
yarn add lllog
bun add lllog
```

## 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 | 1.1.2 |
| Published | 2019-08-04 |
| First published | 2019-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joaquín Ormaechea |
| Maintainers | jormaechea |
| Keywords | logger, log, minimal, logs, node, logging |

## Links

- npm: https://www.npmjs.com/package/lllog
- Repository: https://jormaechea@github.com/jormaechea/lllog
- Homepage: https://github.com/jormaechea/lllog#readme
- Issues: https://github.com/jormaechea/lllog/issues
- npm.io page: https://npm.io/package/lllog

## 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

- 1.1.2 (latest) — 2019-08-04
- 1.1.1 — 2019-08-04
- 1.1.0 — 2019-08-04
- 1.0.1 — 2019-08-04
- 1.0.0 — 2019-08-03

## README

# LLLog

[![npm version](https://badgen.net/npm/v/lllog)](https://www.npmjs.com/package/lllog)
[![Install size](https://badgen.net/packagephobia/install/lllog)](https://www.npmjs.com/package/lllog)
[![Build Status](https://travis-ci.org/jormaechea/lllog.svg?branch=master)](https://travis-ci.org/jormaechea/lllog)
[![Coverage Status](https://coveralls.io/repos/github/jormaechea/lllog/badge.svg?branch=master)](https://coveralls.io/github/jormaechea/lllog?branch=master)

A minimal **zero-dependency** logger.

## Install

`npm i lllog`

## Usage

Here's an simple example of how to use the package:

```js
const logger = require('lllog')();

logger.info('LLLog is great');
````

You can customize the log level when creating your logger, or on runtime:

```js
const logger = require('lllog')('error');

logger.info('This is not gonna be logged');

logger.error('But this will!');
logger.fatal('Also this one');

logger.setMinLevel('info');
logger.info('Now this is beeing logged too');
```

You can even silence every log using the `none` log level

There are 5 log levels which you can use:
- `debug`
- `info`
- `warn`
- `error`
- `fatal`

You can also use you're own log handler (it must implement the five log levels in order to prevent your app from crashing):

```js
const logger = require('lllog')('error', myHandler);

// Or on runtime
logger.setHandler(myOtherHandler);
```

## Tests
Simply run `npm t`

## Contributing
Issues and PRs are welcome, under one condition: maintain the zero dependency promise.

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