0.0.5 • Published 11 years ago

winston-google-spreadsheet v0.0.5

Weekly downloads
6
License
-
Repository
github
Last release
11 years ago

winston-google-spreadsheet

Log data into your Google Spreadsheet with winston

Usage

  var winston = require('winston');
  
  //
  // Requiring `winston-google-spreadsheet` will expose 
  // `winston.transports.GoogleSpreadsheet`
  //
  require('winston-google-spreadsheet').GoogleSpreadsheet;
  
  winston.add(winston.transports.GoogleSpreadsheet, options);

This transport accepts the follow options:

  • fileId: (Default None) The file ID of Google Spreadsheet that you want to log.
  • sheetIdx: (Default 1) The worksheet index of the file.
  • accessToken: (Default None) The access token to the file.
  • level: (Default Info) Level of messages that this transport should log.

In addition to these, the Redis transport also accepts the following options.

  • refresh_token: (Default None) Number of log messages to store.
  • client_id: (Default None) Name of the Redis container you wish your logs to be in.
  • client_secret: (Default None) Name of the Redis channel to stream logs from.

Metadata: Logged as JSON literal in cell

fileId: A file ID is included in the URL of the file. image2

Installation

Installing winston-google-spreadsheet

  $ npm install winston
  $ npm install winston-google-spreadsheet

Create a log file

Create a Google Spreadsheet in your Google Drive, then add timestamp, level, message and meta columns like this image.

image1

Author: Masashi Katsumata