Socket
Socket
Sign inDemoInstall

logsense

Package Overview
Dependencies
6
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    logsense

[![npm version](https://badge.fury.io/js/logsense.svg)](https://badge.fury.io/js/logsense)


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

LogSense - Node Logger

npm version

LogSense is a powerful service to collect and analyze row and structured logs from your server or serverless Node.

You don't need to modify your current logging statements. We'll automatically send your messages and error or any other objects as log parameters. Row messages are auto-discovered into patterns.

Installation

  1. Run npm i logsense
  2. In your main file add:
    const logsense = require('logsense')('YOUR_LOGSENSE_CUSTOMER_TOKEN')
    logsense.install()
    

For Winston add:

const logsense = require('logsense')('YOUR_LOGSENSE_CUSTOMER_TOKEN')
logger.add(new logsense.WinstonTransport())

Usage

Common messages are auto-discovered into patterns:

const sendEmail = ({ address }) => {
  console.info(`Send email to ${address}`)
}
zrzut ekranu 2019-03-7 o 20 28 17

Last argument is used for structured logging:

const sendEmail = ({ address, topic }) => {
  console.info(`Send email to ${address}`, { topic })
}
zrzut ekranu 2019-03-7 o 20 32 15

Discovered and structured parameters can be used in charts: zrzut ekranu 2019-03-7 o 20 40 23

Keywords

FAQs

Last updated on 07 Mar 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc