GithubHelp home page GithubHelp logo

jaredforth / ffel Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 115 KB

FFEL Firebase Email Logger

Home Page: https://www.npmjs.com/package/ffel

License: MIT License

TypeScript 100.00%
sendgrid logger firebase error-reporting firebase-functions

ffel's Introduction

Node.js CI DeepScan grade npm GitHub GitHub package.json version Snyk Vulnerabilities for GitHub Repo GitHub top language GitHub code size in bytes GitHub issues GitHub commit activity

FFEL

About

FFEL Firebase Email Logger.

FFEL is an alternate logging system for NodeJS applications. It uses SendGrid to send emails with an error message to a specified email address. It was developed for programs running on Firebase Functions, but could be used anywhere an email needs to be sent.

Installation

FFEL can be installed via the Github Package Repository:

npm install @jaredforth/[email protected]

or NPM:

npm install ffel

Usage

To import the main Logger class, use:

const { Logger } = require('ffel');

The Logger class takes one argument, which must be an object of the form:

const msg = {
    to: '[email protected]',
    from: '[email protected]',
    subject: 'Example Subject',
    text: 'A message to send',
    apiKey: 'Your SendGrid API key'
}

Initialize with:

const logger = new Logger(msg);

Once setup has been completed, you can use the log() method to send an email via SendGrid and have your error logged to the console:

logger.log("Your error message")

This will send an email to the to field specified in the initialization argument and log the error to the console.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.