Skip to content

@google-cloud/logging-winston v0.1.0

Compare
Choose a tag to compare
@gaofanmichael gaofanmichael released this 25 Oct 21:18
· 571 commits to main since this release

release level

This module provides an easy to use, higher-level layer for working with Stackdriver Logging, compatible with Winston. Simply attach this as a transport to your existing Winston loggers.

var winston = require('winston');
var transport = require('@google-cloud/logging-winston');

winston.add(transport, {
  projectId: 'grape-spaceship-123',
  keyFilename: '/path/to/keyfile.json',
  level: 'warning', // log at 'warning' and above
  resource: {
    type: 'global'
  }
});

winston.error('warp nacelles offline');
winston.verbose('sheilds at 99%');