1.1.1 • Published 1 year ago
winston-mail-lite v1.1.1
winston-mail-lite
Yet another email transport for winston.
Installation
$ npm install winston winston-mail-lite
Usage
const winston = require('winston');
const Mail = require('winston-mail-lite');
const transport = new Mail(options);
const logger = winston.createLogger({ transports: [transport] });
The Mail transport uses nodemailer behind the scenes.
Options specific to winston-mail-lite
are the following:
transportOptions
: options passed tocreateTransport()
(for SMTP transport, for other transports). By default, JSON transport is used.messageOptions
: options passed totransport.sendMail()
. The most common options are:from
: email address of the sender; if nothing is provided, defaults towinston@[server-host-name]
, whereserver-host-name
is whatos.hostname()
returns;to
: email address of the recipient; this option is required;subject
: the subject of the email; defaults toWinston Message
. Supports{{ level }}
and{{ message }}
placeholders (logs severity and the first line of the message respectively).
Differences to winston-mail
winston-mail-lite
was inspired by winston-mail.
The key differences are:
winston-mail-lite
has less dependencies;- uses
nodemailer
instead of emailjs; - has all of its dependencies up-to-date (winston-mail depends on a package with a vulnerability);
- supports only winston >= 3;
- has much more simplier codebase.
1.1.1
1 year ago
1.1.0
1 year ago
1.0.16
2 years ago
1.0.15
3 years ago
1.0.14
4 years ago
1.0.13
5 years ago
1.0.12
5 years ago
1.0.11
5 years ago
1.0.10
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago