New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@testim/coralogix-logger

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@testim/coralogix-logger

Node.js SDK to send your logs to Coralogix

  • 1.1.27-beta
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Coralogix Node.js SDK

npm license node npm Build Status codecov Maintainability Test Coverage GitHub issues GitHub pull requests GitHub contributors


Use coralogix-logger to easily send your logs to Coralogix's log analytics platform.

Table of Content

Prerequisites

Before beginning you must have installed:

  • Node.js
  • npm

Installation

npm install --save coralogix-logger

Usage

JavaScript

var Coralogix = require("coralogix-logger");

// global confing for application name, private key, subsystem name
const config = new Coralogix.LoggerConfig({
    applicationName: "node tester",
    privateKey: "YOUR_PRIVATE_KEY",
    subsystemName: "node tester sub",
});

Coralogix.CoralogixLogger.configure(config);

// create a new logger with category
const logger = new Coralogix.CoralogixLogger("My Category");

// create a log
const log = new Coralogix.Log({
    severity: Coralogix.Severity.info,
    className: "className",
    methodName: "methodName",
    text: "log data",
})
// send log to coralogix
logger.addLog(log);

TypeScript

For using TypeScript sources you should clone this repository, because it's not included in npm distribution.

import {Log, Severity, CoralogixLogger, LoggerConfig} from "coralogix-logger";

// global confing for application name, private key, subsystem name
const config = new LoggerConfig({
    applicationName: "node tester",
    privateKey: "YOUR_PRIVATE_KEY",
    subsystemName: "node tester sub",
});

CoralogixLogger.configure(config);

// create a new logger with category
logger: CoralogixLogger = new CoralogixLogger("My Category")

// create a log
const log = new Log({
    severity: Severity.info,
    className: "className",
    methodName: "methodName",
    text: "log data",
})
// send log to coralogix
logger.addLog(log);

Keywords

FAQs

Package last updated on 14 Dec 2020

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