# datadog-winston

> Ship winston logs to datadog without breaking a sweat

Latest version **1.6.0** (published 2023-12-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install datadog-winston
pnpm add datadog-winston
yarn add datadog-winston
bun add datadog-winston
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.6.0 |
| Published | 2023-12-01 |
| First published | 2019-06-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/datadog-winston) |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 35 |
| Author | itsfadnis |
| Maintainers | itsfadnis |

## Links

- npm: https://www.npmjs.com/package/datadog-winston
- Repository: https://github.com/itsfadnis/datadog-winston
- Homepage: https://github.com/itsfadnis/datadog-winston#readme
- Issues: https://github.com/itsfadnis/datadog-winston/issues
- npm.io page: https://npm.io/package/datadog-winston

## Dependencies (3)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.4.5
- [winston-transport](https://npm.io/package/winston-transport.md) ^4.3.0

## Recent versions

- 1.6.0 (latest) — 2023-12-01
- 1.5.1 — 2020-08-17
- 1.5.0 — 2020-04-28
- 1.4.0 — 2020-04-15
- 1.3.1 — 2020-03-16
- 1.3.0 — 2020-02-29
- 1.2.0 — 2020-02-28
- 1.1.0 — 2020-02-28
- 1.0.1 — 2019-06-06
- 1.0.0 — 2019-06-06

## README

[![Build Status](https://semaphoreci.com/api/v1/itsfadnis/datadog-winston/branches/master/badge.svg)](https://semaphoreci.com/itsfadnis/datadog-winston)

# datadog-winston
Ship winston logs to datadog without breaking a sweat

## Install
```console
$ npm install --save datadog-winston
```
or
```console
$ yarn add datadog-winston
```

## Options
- **apiKey**: Your datadog api key *[required]*
- **hostname**: The machine/server hostname
- **service**: The name of the application or service generating the logs
- **ddsource**: The technology from which the logs originated
- **ddtags**: Metadata assoicated with the logs
- **intakeRegion**: The datadog intake to use. set to `eu` to force logs to be sent to the EU specific intake

## Usage
```javascript
var winston = require('winston')
var DatadogWinston = require('datadog-winston')

var logger = winston.createLogger({
  // Whatever options you need
  // Refer https://github.com/winstonjs/winston#creating-your-own-logger
})

logger.add(
  new DatadogWinston({
    apiKey: 'super_secret_datadog_api_key',
    hostname: 'my_machine',
    service: 'super_service',
    ddsource: 'nodejs',
    ddtags: 'foo:bar,boo:baz'
  })
)
```

---
_Source: https://npm.io/package/datadog-winston · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
