# catlog

> Logging utility withou pain

Latest version **1.0.9** (published 2016-05-26) · MIT license · 0 weekly downloads

## Install

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

## 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.0.9 |
| Published | 2016-05-26 |
| First published | 2012-08-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | RobinQu |
| Maintainers | robinqu |
| Keywords | log, couchdb, console |

## Links

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

## Dependencies (8)

- [colors](https://npm.io/package/colors.md) ^1.1.2
- [lodash](https://npm.io/package/lodash.md) ^3.10.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [ioredis](https://npm.io/package/ioredis.md) ^1.14.0
- [rcfiles](https://npm.io/package/rcfiles.md) ^1.0.1
- [dateformat](https://npm.io/package/dateformat.md) ^1.0.12
- [plugin-party](https://npm.io/package/plugin-party.md) ~0.1.0
- [eventemitter3](https://npm.io/package/eventemitter3.md) ^1.1.1

## 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.0.9 (latest) — 2016-05-26
- 1.0.8 — 2016-05-09
- 1.0.7 — 2016-04-23
- 1.0.6 — 2016-04-23
- 1.0.5 — 2016-04-23
- 1.0.4 — 2016-01-23
- 1.0.2 — 2015-09-04
- 1.0.1 — 2015-08-13
- 1.0.0 — 2015-08-11
- 0.1.0 — 2014-09-27
- 0.0.6 — 2012-08-30
- 0.0.5 — 2012-08-29
- 0.0.4 — 2012-08-28
- 0.0.2 — 2012-08-23
- 0.0.1 — 2012-08-23

## README

# catlog

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

![NPM](https://nodei.co/npm/catlog.png?downloads=true&downloadRank=true&stars=true)

Modern log utility for node apps

* debug utility like [visionmedia/debug](https://github.com/visionmedia/debug)
* full feature logging utilites
* extensible logging frameworks
  * plugins like formatters and log handlers
  * event-driven logging activity
  * context-based configuration


## Documentation

See more at [http://robinqu.github.io/catlog](http://robinqu.github.io/catlog).

## TL;DR

### Simple debug

Just like the popular [visionmedia/debug](https://github.com/visionmedia/debug).

```
const debug = require('catlog')('app:main');

debug('I am here');
debug('Hi, babe!');
```

But the log goes to other handlers ([fs_handler](lib/plugins/fs_handler.js) as default) as well. So your debug info will have chances to be recorded by `fs_handler` in files, instead of being deserted if no `DEBUG` env is set.

### Log, in levels

Behave like old-fashined log utilites.

```
const logger = require('catlog')();

logger.info('good news');
logger.warn('important notice');
logger.error('bad news');
logger.debug('verbose news');
//also have alias, as `log`
logger.log('bad news');
```

## Configuration

All settings are shared in the same process. And configure it on logging context, using:

```
const logger = require('catlog')({
  methods: {
    foobar: {
      target: 'stdout',
      level: 70
    }
  },
  category: 'special_app'
});
```


## License

MIT

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