# coralogix-logger-winston

> Winston transport for sending logs to coralogix

Latest version **1.0.12** (published 2022-04-20) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install coralogix-logger-winston
pnpm add coralogix-logger-winston
yarn add coralogix-logger-winston
bun add coralogix-logger-winston
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.12 |
| Published | 2022-04-20 |
| First published | 2017-01-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | support@coralogix.com |
| Maintainers | yonifarin, zoharaharon, coralogixnpm |
| Keywords | coralogix, winston |

## Links

- npm: https://www.npmjs.com/package/coralogix-logger-winston
- npm.io page: https://npm.io/package/coralogix-logger-winston

## Dependencies (2)

- [util](https://npm.io/package/util.md) ^0.10.3
- [coralogix-logger](https://npm.io/package/coralogix-logger.md) *

## 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

- 1.0.12 (latest) — 2022-04-20
- 1.0.11 — 2019-10-10
- 1.0.10 — 2019-06-03
- 1.0.9 — 2017-12-12
- 1.0.8 — 2017-12-12
- 1.0.7 — 2017-12-11
- 1.0.6 — 2017-01-07
- 1.0.5 — 2017-01-05
- 1.0.4 — 2017-01-05
- 1.0.3 — 2017-01-05
- 1.0.2 — 2017-01-05
- 1.0.1 — 2017-01-05

## README

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



## Description
Use coralogix-logger-winston to easily add a transport to winston inorder to send your logs to [Coralogix's](http://www.coralogix.com) log analytics platform.

## Installation

```sh
npm install --save coralogix-logger-winston
```

### Javascript example (see ts example below)
```js
var winston = require("winston");
var CoralogixWinston = require("coralogix-logger-winston");

// global configuration for coralogix
var config = {
    privateKey: "9626c7dd-8174-5015-a3fe-5572e042b6d9",
    applicationName: "YOUR APP NAME",
    subsystemName: "YOUR SUBSYSTEM",
};

CoralogixWinston.CoralogixTransport.configure(config);

// configure winston to user coralogix transport
winston.configure({
    transports: [new CoralogixWinston.CoralogixTransport({
        category: "YOUR CATEGORY"
    })]
});

// use winston
winston.info("use winston to send your logs to coralogix");
 
```


### Typescript example
```typescript
import * as winston from "winston";
import {CoralogixTransport} from "coralogix-logger-winston";

// global configuration for private key, application name, subsystem name 
const config = {
    privateKey: "YOUR PRIVATE KEY",
    applicationName: "YOUR APP NAME",
    subsystemName: "YOUR SUBSYSTEM"
}

CoralogixTransport.configure(config);


winston.configure({
    transports:[new CoralogixTransport({
        category:"Yoni"
    })]
})

winston.info("use winston to send your logs to coralogix");
```

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