Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ecs-logs-js
Advanced tools
Readme
Note
While this project remains available under its open source license for anyone to use, we are not actively maintaining it, so issues and pull requests may be ignored.
A simple Node.js console logger that outputs human friendly messages in development and ecs-logs compatible messages in production. Supports all of Node's primitive data types, including those that can't be JSON stringified like Error, Map, Set and BigInt.
TypeScript types are also included in the package.
yarn add ecs-logs-js
# or
npm install ecs-logs-js
import { Logger } from 'ecs-logs-js'
const logger = new Logger({ devMode: true })
logger.info('Server started at http://localhost:8000')
logger.warn('Request rate limited', { ip: '127.0.0.1' })
logger.error('🚨 Unexpected Error', new Error('Failed to connect to Postgress'))
Creates a new logger instance.
Type: object
Type: 'emerg' | 'alert' | 'crit' | 'error' | 'warn' | 'notice' | 'info' | 'debug'
Default: 'debug'
Sets the maximum log level that will be output. By setting this option to 'info', it can be used to disable debug logs in production.
Type: boolean
Default: process.env.NODE_ENV === 'development'
Enables the human friendly development output.
Logs a message at the given log level.
Type: 'emerg' | 'alert' | 'crit' | 'error' | 'warn' | 'notice' | 'info' | 'debug'
Log level for the message.
Type: string
The message to log.
Type: any
Any additional data to log with the message. This can be any type.
Logs a message at the respective log level.
Type: string
The message to log.
Type: any
Any additional data to log with the message. This can be any type.
Make sure you have Node >=10 and Yarn installed, and then run yarn install
to install the development dependencies.
To run the tests use yarn test
. To run the tests in watch mode use yarn test --watch
.
To lint the files use yarn lint
.
To compile the TypeScript files use yarn build
.
FAQs
Simple Node.js console logger that outputs human friendly and ecs-logs compatible messages
The npm package ecs-logs-js receives a total of 2,457 weekly downloads. As such, ecs-logs-js popularity was classified as popular.
We found that ecs-logs-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 300 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.