winston-google-spreadsheet

Log data into your Google Spreadsheet with [winston][0] logger modules.

winston-google-spreadsheet

Log data into your Google Spreadsheet with winston

  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.

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

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

Author: Masashi Katsumata