Skip to content

tuananh/winston-gcloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Google Cloud Logging transport for winston

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published