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

@shelf/winston-datadog-logs-transport

Package Overview
Dependencies
Maintainers
16
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shelf/winston-datadog-logs-transport

A Datadog Logs transport for Winston

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
increased by16.05%
Maintainers
16
Weekly downloads
 
Created
Source

winston-datadog-logs-transport

Winston transport for Datadog Logs (not events)

There are 3 winston transports for Datadog on NPM: 1, 2, 3.

All of them send data to Datadog Events instead of Datadog Logs. This package actually is a transport for Datadog Logs, not Events.

Install

$ yarn add @shelf/winston-datadog-logs-transport

Usage

import winston from 'winston';
import DatadogTransport from '@shelf/winston-datadog-logs-transport';

const logger = winston.createLogger({
  transports: [
    new DatadogTransport({
      apiKey: process.env.DD_API_KEY, // Datadog API key
      port: 443, // optional port, 443 is for EU region secure port
      host: 'tcp-intake.logs.datadoghq.eu', // optinal host, 'tcp-intake.logs.datadoghq.eu' is for EU region host
      // optional metadata which will be merged with every log message
      metadata: {
        ddsource: 'lambda',
        environment: 'prod'
      }
    })
  ]
});

logger.info('Hey there', {thisIsMy: 'metadata'});

Publish

$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags

License

MIT © Shelf

Keywords

FAQs

Package last updated on 18 Feb 2021

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