Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@log4js-node/loggly

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@log4js-node/loggly

Loggly Appender for log4js-node

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
72
decreased by-13.25%
Maintainers
1
Weekly downloads
 
Created
Source

Loggly Appender for Log4JS

Sends logging events to Loggly, optionally adding tags. This appender uses node-loggly-bulk. Consult the docs for node-loggly-bulk, or loggly itself, if you want more information on the configuration options below.

Installation

npm install @log4js-node/loggly

(This is a plug-in appender for log4js, so you'll need that as well)

Configuration

  • type - @log4js-node/loggly
  • token - string - your really long input token
  • subdomain - string - your subdomain
  • auth - object (optional) - authentication details
    • username - string
    • password - string
  • tags - Array<string> (optional) - tags to include in every log message

This appender will scan the msg from the logging event, and pull out any argument of the shape { tags: [] } so that it's possible to add additional tags in a normal logging call. See the example below.

Example

log4js.configure({
  appenders: {
    loggly: {
      type: 'loggly',
      token: 'somethinglong',
      subdomain: 'your.subdomain',
      tags: [ 'tag1' ]
    }
  },
  categories: {
    default: { appenders: ['loggly'], level: 'info' }
  }
});

const logger = log4js.getLogger();
logger.info({ tags: ['my-tag-1', 'my-tag-2'] }, 'Some message');

This will result in a log message being sent to loggly with the tags tag1, my-tag-1, my-tag-2.

Keywords

FAQs

Package last updated on 25 Feb 2018

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