Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zkochan/logger
A simple logger
https://github.com/zkochan/logger
Last synced: 29 days ago
JSON representation
A simple logger
- Host: GitHub
- URL: https://github.com/zkochan/logger
- Owner: zkochan
- License: mit
- Created: 2016-09-01T14:40:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-06T19:10:27.000Z (over 7 years ago)
- Last Synced: 2024-12-07T06:46:56.017Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @zkochan/logger
> A simple logger
[![npm version](https://img.shields.io/npm/v/@zkochan/logger.svg)](https://www.npmjs.com/package/@zkochan/logger) [![Build Status](https://img.shields.io/travis/zkochan/logger/master.svg)](https://travis-ci.org/zkochan/logger)
## Installation
```sh
npm i -S @zkochan/logger
```## Usage
```js
const logger = require('@zkochan/logger')logger.on('info', console.log.bind(console))
logger.log('info', 'some-type', 'Helo World!')
//> null 'info' 'some-type' 'Helo World!'const forkedLogger = logger.fork({ foo: 'bar' })
forkedLogger.log('info', 'some-type', 'Helo World!', 1, 2, 3)
//> { foo: 'bar' } 'info' 'some-type' 'Helo World!' 1 2 3
```## License
[MIT](./LICENSE) © Zoltan Kochan