1.0.16 • Published 6 months ago

winston-mail-lite v1.0.16

Weekly downloads
37
License
MIT
Repository
github
Last release
6 months ago

winston-mail-lite

Build and Test CI NPM

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 to createTransport() (for SMTP transport, for other transports). By default, JSON transport is used.
  • messageOptions: options passed to transport.sendMail(). The most common options are:
    • from: email address of the sender; if nothing is provided, defaults to winston@[server-host-name], where server-host-name is what os.hostname() returns;
    • to: email address of the recipient; this option is required;
    • subject: the subject of the email; defaults to Winston 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:

1.0.16

6 months ago

1.0.15

2 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago