Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/segment-boneyard/winston-logger

Create a winston logger using a simple API.
https://github.com/segment-boneyard/winston-logger

Last synced: about 7 hours ago
JSON representation

Create a winston logger using a simple API.

Awesome Lists containing this project

README

        

# winston-logger

Create a winston logger using a simple API.

## Example

```js
var Logger = require('winston-logger');

var logger = Logger({ console: true });
logger.info(..)
```

Here's an example `development` option set:

```js
{
"console" : true
}
```

And `production` options:

```js
{
"file" : true,
"console" : false,
"mail" : {
"to": "[email protected]",
"from": "[email protected]",
"level": "critical",
"host": "smtp.sendgrid.net",
"username": "sendgrid_user",
"password": "sendgrid_pass",
"ssl": false
},
"papertrail" : {
"host": "logs.papertrailapp.com",
"port": 10000,
"level": "error"
}
}
```

## API

#### Logger(options)

Create a winston logger with provided transports in the options.

## License

```
WWWWWW||WWWWWW
W W W||W W W
||
( OO )__________
/ | \
/o o| MIT \
\___/||_||__||_|| *
|| || || ||
_||_|| _||_||
(__|__|(__|__|
```