1.0.1 • Published 8 years ago
winston-dropbox v1.0.1
Winston Dropbox Logger
A Winston transport to log into a dropbox file.
Install
npm install winston winston-dropboxSetup
const winston = require('winston');
const winstonDropbox = require('winston-dropbox');
const options = {
apiKey: 'DROPBOX_API_TOKEN'
}
const logger = new winston.Logger({
level: 'info',
transports: [
new (winston.transports.Console)({'timestamp':true}),
new (winstonDropbox)(options)
]
});
logger.info('Hello Dropbox logger');| Options | Description |
|---|---|
| apiKey (Required) | String. Generate your own dropbox token |
| name (optional) | String. Default: logs. |
| dailyRotate (optional) | Boolean. Default true. |
License
MIT