# li-log

> Little tiny logger

Latest version **0.9.6** (published 2020-11-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install li-log
pnpm add li-log
yarn add li-log
bun add li-log
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.6 |
| Published | 2020-11-01 |
| First published | 2017-09-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.2.4 |
| Dependencies | 1 |
| Unpacked size | 59.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | “Andrey |
| Maintainers | andreydos |
| Keywords | logger, log, console, color-console |

## Links

- npm: https://www.npmjs.com/package/li-log
- Repository: https://github.com/andreydos/li-log
- Homepage: https://github.com/andreydos/li-log#readme
- Issues: https://github.com/andreydos/li-log/issues
- npm.io page: https://npm.io/package/li-log

## Dependencies (1)

- [format-date-time](https://npm.io/package/format-date-time.md) ^0.2.0

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

- 0.9.6 (latest) — 2020-11-01
- 0.9.5 — 2018-05-02
- 0.9.4 — 2017-11-14
- 0.9.3 — 2017-11-01
- 0.9.2 — 2017-10-31
- 0.9.1 — 2017-10-11
- 0.9.0 — 2017-10-10
- 0.8.5 — 2017-10-09
- 0.8.4 — 2017-10-06
- 0.8.3 — 2017-10-02
- 0.8.1 — 2017-10-02
- 0.7.1 — 2017-10-02
- 0.8.0 — 2017-10-01
- 0.7.0 — 2017-09-30
- 0.6.0 — 2017-09-29
- … 9 more at https://npm.io/package/li-log/versions

## README

# li-log

[![Build Status](https://travis-ci.org/andreydos/li-log.svg?branch=master)](https://travis-ci.org/andreydos/li-log)
[![Coverage Status](https://coveralls.io/repos/github/andreydos/li-log/badge.svg?branch=master)](https://coveralls.io/github/andreydos/li-log?branch=master)

# Little Logger

Little tiny logger. Can be used in browser and node environment. Add useful data to message and some pretty styles in browser.

## Getting Started
**Browser usage** please look at examples directory (browser version available locally in project 'dist/li-log.min.js').

Browser minified version: [link](https://raw.githubusercontent.com/andreydos/li-log/master/dist/li-log.min.js) 

Use:
```
var logger = new LiLog();
logger.warning('Hello warning!');
```

**Node usage**:

```
npm install li-log
```

* Define logger with default setting:

```
var LiLog = require("li-log")

var logger = new LiLog();

logger.info('Info');
```

* Define logger with custom setting (log level - 3. Methods: debug, info, warning will be skipped, messages with methods: error, critical will be printed in the console):


```
var LiLog = require("li-log")

var logger = new LiLog({ level: 3});

logger.info('Info'); // will be skipped
logger.error('Error) // you'll see in console
```

_Here will be described another setting options in the future._

* Disable color output(with user options):

```
var logger = new liLog({
    coloredOutput: false,
    ... otherOptions
});
```

or with single string argument 

```
var logger = new liLog('no-color');

```

* Disable stack info:

```
var logger = new liLog({ showStackData : false });
```

* Output only specified log methods:

```
logger.outputOnly(['critical']);

logger.disableOutputOnlyOption(); // to disable this feature
```

* Disable logger:

```
logger.disable();
```


## Running the tests

Run test:

```
npm run test
```

Run test on Windows machine

```
npm run testWin
```

## Versioning

We use [SemVer](http://semver.org/) for versioning. 

## Authors

* **Andrii Dotsia** - *Initial work* - [andreydos](https://github.com/andreydos)

See also the list of [contributors](https://github.com/andreydos/li-log/graphs/contributors) who participated in this project.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

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