winston-gae
This module is no longer maintained. Please use the official module @google-cloud/logging-winston instead.
A Google App Engine (Managed VMs) transport for Winston. Logs will show up in the Google Developers Console Logs Viewer.
Installation
$ npm install winston$ npm install winston-gae
Usage
var winston = ; // Requiring `winston-gae` will expose// `winston.transports.GoogleAppEngine`// and// `winston.config.GoogleAppEngine.levels`; var logger = levels: winstonconfigGoogleAppEnginelevels transports: // capture logs at emergency level and above (all levels) level: 'emergency' ; logger;logger;logger;logger;logger;logger;logger;logger;logger;
There is one optional setting:
level
- The lowest log level this transport will log, defaults toinfo
Viewing your logs
When winston-gae
is used as a Winston transport in a Node.js app running on Google App Engine (Managed VMs), logs will be visible in the Google Developers Console Logs Viewer.
After selecting your Cloud project, navigate to Monitoring > Logs
in the left navigation bar. Select App Engine
, your module, your version, and app
log type from the drop-down menus.