Wondering what’s next for npm?Check out our public roadmap! »

    This package has been deprecated

    Author message:

    This module is no longer maintained. Please use the official module @google-cloud/logging-winston instead.

    winston-gae

    0.1.1 • Public • Published

    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 = require('winston');
     
    // Requiring `winston-gae` will expose
    // `winston.transports.GoogleAppEngine`
    // and
    // `winston.config.GoogleAppEngine.levels`
    require('winston-gae');
     
    var logger = new winston.Logger({
      levels: winston.config.GoogleAppEngine.levels,
      transports: [
        new winston.transports.GoogleAppEngine({
          // capture logs at emergency level and above (all levels)
          level: 'emergency'
        })
      ]
    });
     
    logger.default('this is a default message');
    logger.debug('this is a debug message');
    logger.info('this is my normal message');
    logger.notice('this is a notice');
    logger.warning('this is a warning');
    logger.error('this is an error message');
    logger.critical('this is a critical message');
    logger.alert('this is an alert');
    logger.emergency('this is an emergency');

    There is one optional setting:

    • level - The lowest log level this transport will log, defaults to info

    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.

    Install

    npm i winston-gae

    DownloadsWeekly Downloads

    8

    Version

    0.1.1

    License

    none

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar