# nanologger

> Cute browser logs

Latest version **2.0.0** (published 2019-06-11) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2.0.0 |
| Published | 2019-06-11 |
| First published | 2017-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 81 |
| Maintainers | ahdinosaur, almost, amongiants, benlyn, bret, colingourlay, emilbayes, feross, freeman-lab, goto-bus-stop, graforlock, jameskyburz, juliangruber, lrlna, mafintosh, maxogden, s3ththompson, sethvincent, shama, slaskis, substack, timwis, toddself, tornqvist, ungoldman, yerkopalma, yoshuawuyts |
| Keywords | browser, emoji, log |

## Links

- npm: https://www.npmjs.com/package/nanologger
- Repository: https://github.com/choojs/nanologger
- Homepage: https://github.com/choojs/nanologger#readme
- Issues: https://github.com/choojs/nanologger/issues
- npm.io page: https://npm.io/package/nanologger

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

- 2.0.0 (latest) — 2019-06-11
- 1.3.1 — 2017-09-11
- 1.3.0 — 2017-08-02
- 1.2.0 — 2017-07-09
- 1.1.0 — 2017-05-22
- 1.0.3 — 2017-04-10
- 1.0.2 — 2017-03-27
- 1.0.1 — 2017-03-05
- 1.0.0 — 2017-03-04

## README

# nanologger [![stability][0]][1]
[![npm version][2]][3] [![build status][4]][5]
[![downloads][8]][9] [![js-standard-style][10]][11]

Cute browser logger.

## Usage
```js
var nanologger = require('nanologger')
var log = nanologger('my-cool-logger')

log.debug('it works!')
log.info('hey')
log.warn('oh')
log.error('oh no!')
log.fatal('send help')
```

## API
### `log = logger([name][, opts])`
Create a new `nanologger` instance. Name defaults to `'unknown'`. Opts should be an object with the following properties:

- colors: Key/value object used to set the colors of the logger. If any of the expected colors is not set, it will use [the defaults][12], any extra color will be ignored.

### `level = log.logLevel`
Read the current logLevel. The log level can be set through
`localStorage.setItem('logLevel', '<level>')`. It's read once at boot time.

### `log.debug(message)`
Emit a message at loglevel 🐛

### `log.info(message)`
Emit a message at loglevel ✨

### `log.warn(message)`
Emit a message at loglevel ⚠️

### `log.error(message)`
Emit a message at loglevel 🚨

### `log.fatal(message)`
Emit a message at loglevel 💀

## See Also
- [lrlna/pino-colada](https://github.com/lrlna/pino-colada)
- [pinojs/pino](https://github.com/pinojs/pino)

## License
[MIT](https://tldrlegal.com/license/mit-license)

[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square
[1]: https://nodejs.org/api/documentation.html#documentation_stability_index
[2]: https://img.shields.io/npm/v/nanologger.svg?style=flat-square
[3]: https://npmjs.org/package/nanologger
[4]: https://img.shields.io/travis/choojs/nanologger/master.svg?style=flat-square
[5]: https://travis-ci.org/choojs/nanologger
[6]: https://img.shields.io/codecov/c/github/choojs/nanologger/master.svg?style=flat-square
[7]: https://codecov.io/github/choojs/nanologger
[8]: http://img.shields.io/npm/dm/nanologger.svg?style=flat-square
[9]: https://npmjs.org/package/nanologger
[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[11]: https://github.com/feross/standard
[12]: https://github.com/choojs/nanologger/blob/master/index.js#L22-L34

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