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

@curve-technology/log4js-datadog

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@curve-technology/log4js-datadog

Datadog appender for log4js

  • 0.0.3
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

log4js-datadog

A basic Datadog appender for log4js.

Installation

npm install @curve-technology/log4js-datadog

Usage

The log4js-datadog appender enables the forwarding of log4js log events to Datadog. It has been specifically created for use in Auth0 action scripts and rules. To use this appender, simply include it in the list of appenders in the log4js configuration, and provide the relevant Datadog details.

Note that message tags can be included in log events using DataDogTags:

log4js.configure({
     "appenders": [
         {
             type: "@curve-technology/log4js-datadog",
             apiKey: "datadog-api-key",
             intakeHost: "http-intake.logs.datadoghq.eu",
             errorHandler: e => console.log(e),
             category: "cheese",
             source: "some-source",
         },
     ]
 });
 
 const logger = log4js.getLogger("cheese");
 logger.info("Started cheese course", {tags: {env: "dev", severity: 3}}, "cheese selected", {tags: {"cheese": "epoisses"}});

Configuration

In addition to the standard log appender configuration options, the log4js-datadog appender requires DataDog specific settings:

  • apiKey The Datadog API key for your organisation
  • intakeHost The https log forwarding endpoint for Datadog
  • errorHandler (optional) Handler that will be called when an error occurs with sending a log even to Datadog. Note that by default such errors will be ignored.
  • hostname (optional) The hostname that should appear in log messages. Defaults to the system hostname

License

MIT

Keywords

FAQs

Package last updated on 21 Nov 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc