Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dsys/pavlog

:memo: Unified logging for npm modules
https://github.com/dsys/pavlog

Last synced: about 1 month ago
JSON representation

:memo: Unified logging for npm modules

Awesome Lists containing this project

README

        

# pavlog

[![TravisCI shield](https://img.shields.io/travis/pavlovml/pavlog.svg)](https://travis-ci.org/pavlovml/pavlog) [![npm shield](https://img.shields.io/npm/v/pavlog.svg)](https://www.npmjs.com/package/pavlog) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)

Unified logging for npm modules.

## Installation

$ npm install pavlog --save

## Usage

```javascript
import pavlog from 'pavlog'
pavlog.useConsole()

const log = pavlog.child('olive')

log('Start logging...') // default level: info
log.fatal('All your base are belong to us!')
```

## Development

Pavlog uses [JavaScript Standard Style](https://github.com/feross/standard), [Babel](https://babeljs.io/) for ES6+ support, and [Jest](http://facebook.github.io/jest/) for testing.

$ git clone [email protected]:pavlovml/pavlog.git
$ make test

To run the tests on file changes:

$ env WATCH=true make test

## TODO

* Advanced console pretty-printing (esp. for errors)
* Listeners for other logging services
* More documentation

## License

[BSD 3-Clause](https://github.com/pavlovml/pavlog/blob/master/LICENSE)