Nitrogenous Polymorphic Molecule
Miss any of our Open RFC calls?Watch the recordings here! »

This package has been deprecated

Author message:

WARNING: This project is not maintained by Coralogix, to use the official Coralogix package, install using coralogix-logger-winston

coralogix-winston

1.1.0 • Public • Published

This package lets you connect your nodeJS applications to Coralogix's log analytics platform.

Coralogix Winston Transport

For more information on how to setup and use winston head over to the winston repository.

Installation

npm install coralogix-winston --save

Usage

var winston = require('winston');
var CoralogixWinston = require('coralogix-winston');
var hostname = require('os').hostname();
 
 
var winstonLogger = new (winston.Logger)({
  transports: [
    new (CoralogixWinston)({
      privateKey: '00000000-0000-0000-0000-000000000000', // your private key you received when signing up
      applicationName: 'ACME Website',
      subsystemName: 'WebAPI',
      computerName: hostname, // optional
      level: 'debug' // winston log level
    })
  ]
});
 
// use winston regularly
winstonLogger.debug('This is a debug message');
// send Coralogix optional data for better learning and querying.
// these reserved word parameters will not be part of the message text.
winstonLogger.debug('A user has signed in', {
  'class': 'UserManager',
  'method': 'HandleSignin',
  'category': 'Security',
  'IPAddress': '1.1.1.1',
  'threadId': '123-a'
});

Keywords

none

Install

npm i coralogix-winston

DownloadsWeekly Downloads

60

Version

1.1.0

License

ISC

Last publish

Collaborators

  • avatar