winston-gcloud
v1.0.1
Published
Google Cloud Logging transport for winston
Downloads
2
Maintainers
Readme
winston-gcloud
Google Cloud Logging transport for winston
GCL transport for winston with support for queue and batch write to reduce api usage.
Installation
$ npm install winston-gcloud --save
Usage
var winston = require('winston')
var GoogleCloudLogging = require('winston-gcloud')
var options = {
level: 'verbose',
gcl_project_id: '<project-id>',
gcl_key_filename: '<key-file-name>',
gcl_log_name: '<log-name>',
batch_size: 5
}
winston.add(GoogleCloudLogging, options);
winston.error('test', {msg: Math.random()})
winston.error('test', {msg: Math.random()})
winston.error('test', {msg: Math.random()})
winston.error('test', {msg: Math.random()})
winston.error('test', {msg: Math.random()})
winston.error('test', {msg: Math.random()})
winston.error('test', {msg: Math.random()})
winston.error('test', {msg: Math.random()})
winston.error('test', {msg: Math.random()})
winston.error('test', {msg: Math.random()})
winston-gcloud
use better-queue for queue management.
License
MIT © Tuan Anh Tran