Socket
Socket
Sign inDemoInstall

winston

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston - npm Package Compare versions

Comparing version 0.5.8 to 0.5.9

6

lib/winston/container.js

@@ -57,4 +57,6 @@ /*

}
options.transports.push(new (winston.transports[name])(options[key]));
var namedOptions = options[key];
namedOptions.id = id;
options.transports.push(new (winston.transports[name])(namedOptions));
});

@@ -61,0 +63,0 @@

@@ -25,2 +25,9 @@ /*

function valid() {
return options.inputToken
|| options.inputName && options.auth
|| options.inputName && options.inputs && options.inputs[options.inputName]
|| options.id && options.inputs && options.inputs[options.id];
}
if (!options.subdomain) {

@@ -30,10 +37,6 @@ throw new Error('Loggly Subdomain is required');

if (!options.inputToken && !options.inputName) {
if (!valid()) {
throw new Error('Target input token or name is required.');
}
}
if (!options.auth && options.inputName) {
throw new Error('Loggly authentication is required');
}
this.name = 'loggly';

@@ -52,4 +55,5 @@ this.logBuffer = [];

}
else if (options.inputName && options.inputs && options.inputs[options.inputName]) {
this.inputToken = options.inputs[inputName];
else if (options.inputs && (options.inputs[options.inputName]
|| options.inputs[options.id])) {
this.inputToken = options.inputs[options.inputName] || options.inputs[options.id];
this.ready = true;

@@ -56,0 +60,0 @@ }

{
"name": "winston",
"description": "A multi-transport async logging library for Node.js",
"version": "0.5.8",
"version": "0.5.9",
"author": "Charlie Robbins <charlie.robbins@gmail.com>",

@@ -6,0 +6,0 @@ "contributors": [

@@ -565,2 +565,25 @@ # winston [![Build Status](https://secure.travis-ci.org/flatiron/winston.png)](http://travis-ci.org/flatiron/winston)

### Mail Transport
The [winston-mail][19] is an email transport:
``` js
var Mail = require('winston-simpledb').Mail;
winston.add(Mail, options);
```
The Mail transport uses [node-mail][20] behind the scenes. Options are the following, `to` and `host` are required:
* __to:__ The address(es) you want to send to. *[required]*
* __from:__ The address you want to send from. (default: `winston@[server-host-name]`)
* __host:__ SMTP server hostname
* __port:__ SMTP port (default: 587 or 25)
* __secure:__ Use secure
* __username__ User for server auth
* __password__ Password for server auth
* __level:__ Level of messages that this transport should log.
* __silent:__ Boolean flag indicating whether to suppress output.
*Metadata:* Stringified as JSON in email.
### Adding Custom Transports

@@ -667,1 +690,3 @@ Adding a custom transport (say for one of the datastore on the Roadmap) is actually pretty easy. All you need to do is accept a couple of options, set a name, implement a log() method, and add it to the set of transports exposed by winston.

[18]: http://github.com/appsattic/winston-simpledb
[19]: http://github.com/wavded/winston-mail
[20]: https://github.com/weaver/node-mail
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc