# get-log

> Logging utility, easy to use and ready for production

Latest version **1.1.5** (published 2015-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install get-log
pnpm add get-log
yarn add get-log
bun add get-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 | 1.1.5 |
| Published | 2015-05-20 |
| First published | 2014-10-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >0.10.30 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Enrico Stara |
| Maintainers | enricostara |
| Keywords | log, logging, logger, utility, util |

## Links

- npm: https://www.npmjs.com/package/get-log
- Repository: https://github.com/enricostara/get-log
- Issues: https://github.com/enricostara/get-log/issues
- npm.io page: https://npm.io/package/get-log

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) latest
- [colors](https://npm.io/package/colors.md) latest
- [buffer-crc32](https://npm.io/package/buffer-crc32.md) latest

## 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.5 (latest) — 2015-05-20
- 1.1.4 — 2015-04-15
- 1.1.2 — 2015-04-12
- 1.1.1 — 2015-04-12
- 1.1.0 — 2015-04-12
- 1.0.6 — 2015-03-07
- 1.0.5 — 2014-12-02
- 1.0.4 — 2014-12-02
- 1.0.3 — 2014-11-10
- 1.0.2 — 2014-11-05
- 1.0.1 — 2014-10-30
- 1.0.0 — 2014-10-30

## README

# get-log

Node.js Logging Utility, easy to use and ready for production.

## Installation

```bash
$ git clone --branch=master git://github.com/enricostara/get-log.git
$ cd get-log
$ npm install
```

## Coding

```js
var getLogger = require('get-log');

getLogger.PROJECT_NAME = 'my-best-app';
// or better: getLogger.PROJECT_NAME = require('./package.json').name;

var logger = getLogger('awesome-name');

logger.info('Let\'s start!');

logger.debug('Current file is %s', __filename);

var uglyLogger = getLogger('ugly-name');

uglyLogger.warn('This a Warning! Next debug log could not be displayed..');

uglyLogger.debug('Please, don\'t print me!');

uglyLogger.error('I\'m an error log, isn\'t it?');

```

## Execution

Set `DEBUG` env  to configure what logger (by name) can log at debug level. 
Use `*` as wildcard and use `-` as name prefix to exclude; the values are comma separated.
   
 ```bash
$ DEBUG=*,-*ugly-name node example.js 
  ```

## Output

 ```bash
[my-best-app:awesome-name] debug is ENABLED
[INFO] Thu, 30 Oct 2014 00:16:43 GMT my-best-app:awesome-name Let s start!
[DEBUG] Thu, 30 Oct 2014 00:16:43 GMT  my-best-app:awesome-name Current file is /example.js 
[WARN] Thu, 30 Oct 2014 00:16:43 GMT my-best-app:ugly-name This a Warning! Next debug log could not be displayed..
[ERROR] Thu, 30 Oct 2014 00:16:43 GMT my-best-app:ugly-name I m an error log, isn t it?
  ```
  
## Unit Testing 

```bash
$ npm test
```

## Dependencies

- [colors](https://github.com/Marak/colors.js): get colors in your node.js console
 
- [debug](https://github.com/visionmedia/debug): tiny node.js and browser debugging utility for your libraries and applications


## License

The project is released under the [MIT license](./LICENSE)

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