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

@techteamer/ecs-plugin

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@techteamer/ecs-plugin

ecs_appender for log4js

  • 1.0.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

ECS appender for log4js

This package contains an appender for log4js and a helper for formatting ecs.

Install
yarn add @techteamer/ecs-plugin
Usage
/* Import MJS */
import { ecs, Formatter } from '@techteamer/ecs-plugin'

/* Import CJS */
const ecs = require("@techteamer/ecs-plugin").ecs
const Formatter = require("@techteamer/ecs-plugin").Formatter

// appender (logger.js)
  log4js.configure({
    appenders: {
      custom: {
        type: ecs,
        customConfig: {
          display: 'json'
        }
      }
    },
    categories: {
      default: { appenders: ['custom'], level: 'debug' }
    }
  })

// Formatter
  ...
  const someServiceFormatter = new Formatter('', { service: 'Some service' })
  ...
  const someServiceMethodFormatter: Formatter = this.someServiceFormatter.getClone()
  ...
  logger.info(
    someServiceMethodFormatter
      .addLabel({ method: 'testMethod' })
      .addTag('unit test')
      .appendMessage('call test method')
      .format()
  )

FAQs

Package last updated on 16 Jan 2025

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