Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

winston-mail

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-mail - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

7

changelog.md
0.5.0 / 2015-09-16
==================
* Handle Error meta [perrin4869]
* Enable boolean to log only the selected level and none above [jamie-ez]
* Docs for subject templating
0.4.0 / 2015-04-13

@@ -3,0 +10,0 @@ ==================

@@ -38,2 +38,3 @@ /*

this.level = options.level || 'info';
this.unique = options.unique || false;
this.silent = options.silent || false;

@@ -75,5 +76,15 @@ this.subject = options.subject ? template(options.subject) : template("winston: {{level}} {{msg}}");

if (this.silent) return callback(null, true);
if (this.unique && this.level != level) return callback(null, true);
var body = msg;
// convert meta to string if it is an error
if(meta instanceof Error) {
meta = {
message: meta.message,
name: meta.name,
stack: meta.stack
};
}
// add meta info into the body if not empty

@@ -80,0 +91,0 @@ if (meta !== null && meta !== undefined && (typeof meta !== 'object' || Object.keys(meta).length > 0))

2

package.json
{
"name": "winston-mail",
"description": "A mail transport for winston",
"version": "0.4.0",
"version": "0.5.0",
"author": "Marc Harter <wavded@gmail.com>",

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

@@ -45,5 +45,12 @@ # winston-mail [![Build Status](https://travis-ci.org/wavded/winston-mail.svg?branch=master)](https://travis-ci.org/wavded/winston-mail)

* __level:__ Level of messages that this transport should log.
* __unique:__ Boolean flag indicating whether to log only the declared level and none above.
* __silent:__ Boolean flag indicating whether to suppress output.
* __html:__ Boolean flag indicating whether to send mail body as html attach.
## Subject templating
The __subject__ option takes a mustache template string that exposes the following fields:
- `{{level}}` - Log level
- `{{msg}}` - First line of the error message
## License

@@ -50,0 +57,0 @@ The MIT License (MIT)

Sorry, the diff of this file is not supported yet

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