# newrelic-winston

> A newrelic transport for winston

Latest version **2.1.0** (published 2019-09-02) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2019-09-02 |
| First published | 2015-08-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 11.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Luciano Colosio |
| Maintainers | namshi, odino, unlucio |
| Keywords | logging, sysadmin, tools, winston, newrelic |

## Links

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

## Dependencies (3)

- [winston](https://npm.io/package/winston.md) ^3.0.0
- [newrelic](https://npm.io/package/newrelic.md) ^5.11.0
- [winston-transport](https://npm.io/package/winston-transport.md) ^4.2.0

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 2.1.0 (latest) — 2019-09-02
- 2.0.2 — 2018-07-18
- 2.0.0 — 2018-07-16
- 0.0.1 — 2015-08-04

## README

# newrelic-winston [![Build Status](https://secure.travis-ci.org/namshi/newrelic-winston.png)](http://travis-ci.org/namshi/newrelic-winston)

A [newrelic][0] transport for [winston][1] including the [newrelic][2] Library

## Installation

Tested on node-6.x, requires npm.

``` sh
  $ npm install winston --save
  $ npm install newrelic-winston --save
```

## Usage
```javascript
const winston = require('winston');
const NewrelicWinston = require('newrelic-winston');
winston.add(new NewrelicWinston(options));

```

or

```javascript
const { createLogger } = require('winston');
const NewrelicWinston = require('newrelic-winston');
const logger = createLogger({
    transports: [
        new NewrelicWinston(options),
    ],
});
```
## Options
* __env__:  the current evironment. Defatuls to `process.env.NODE_ENV`

If `env` is either 'dev' or 'test' the lib will _not_ load the included newrelic module saving devs from anoying errors ;)

## Config
Please refer to the [newrelic lib's readme](https://github.com/newrelic/node-newrelic#configuring-the-module) for specific module's configs.

## Log Levels
This trasport is meant to report errors to newrelic, so the only level available in order to log something is **error**

**All other possible winston's levels, or custom levels, will noop**

[0]: http://newrelic.com/
[1]: https://github.com/flatiron/winston
[2]: https://github.com/newrelic/node-newrelic

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