1.0.12 • Published 2 years ago

coralogix-logger-winston v1.0.12

Weekly downloads
2,736
License
ISC
Repository
-
Last release
2 years ago

npm version

Description

Use coralogix-logger-winston to easily add a transport to winston inorder to send your logs to Coralogix's log analytics platform.

Installation

npm install --save coralogix-logger-winston

Javascript example (see ts example below)

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

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");
1.0.12

2 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago