0.3.1 • Published 6 years ago

winston-sqs-tlrg v0.3.1

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

Amazon SQS Transport for winston Build Status

Installation via npm

  $ npm install winston
  $ npm install winston-sqs

Usage

  var winston = require('winston');
  require('winston-sqs').SQS;
  winston.add(winston.transports.SQS, options);

The Winston SQS transport depends on aws-sdk.

The constructor options are:

  • queueurl: The specific queue URL to write to. Found in your AWS Console. required
  • region: AWS Region to use. (default: us-east-1) required if do not pass in sqsOptions
  • sqsOptions: The sqs options to use. (if passed in, region is not required)
  • colorize: Boolean flag indicating if we should colorize output.
  • debug: log error/response after each message sent (default: false)
  • depth Numeric indicating how many times to recurse while formatting the object with util.inspect (only used with prettyPrint: true) (default null, unlimited)
  • formatter: If function is specified and json is set to false, its return value will be used instead of default output. (default undefined)
  • json: If true, messages will be logged as JSON (default true).
  • level: Level of messages that this transport should log.
  • logstash: If true, messages will be logged as JSON and formatted for logstash (default false).
  • prettyPrint: If true, additional JSON metadata objects that are added to logging string messages will be displayed as a JSON string representation. If function is specified, its return value will be the string representing the meta.
  • showLevel: Boolean flag indicating if we should prepend output with level (default true).
  • silent: Boolean flag indicating whether to suppress output.
  • timestamp: Boolean flag indicating if we should prepend output with timestamps (default true). If function is specified, its return value will be used instead of timestamps.
  • ... and few more common with other Winston Transports

Metadata: Logged via util.inspect(meta);

Note that metadata will be automatically 'stringified.'