
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Logging utility for node and the browser. Displays colored package namespace in front and exits on error. Unless message ends in ".!?\n" a dot will be added to the end.
import { create } from 'logua'
// First create the log with the package context.
const log = create('my-pkg', 'blue')
log(`Found ${files} files`)
// => my-pkg Found 5 files.
log('Please add a description field', 'warning')
// => my-pkg Please add a description field.
log('package.json file is missing', 'error')
// => my-pkg package.json file is missing.
// => exits the process!
The following colors are available: black, red, green, yellow, blue, magenta, cyan, white, gray, grey, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, darkOrange, orange
// log.js
import { create } from 'logua'
export const log = create('some-pkg', 'red')
Then import the contextualized log:
import { log } from './log.js'
log('Hello World')
// => some-pkg Hello World.
To avoid spamming the log messages can be grouped. After a timeout a single message will be output instead of various messages.
const files = ['hello.js', 'world.js', 'more-files.js']
files.forEach((file) =>
log(`Copying ${file}`, {
// Some identifier for the group.
group: 'copy',
// Group message, used if there is more than one log for this id during the timeout.
groupMessage: (count: number) => `Copying ${count} files`,
groupMessage: 'Files copied successfully',
// Optional timeout until messages are collected.
timeout: 100,
}),
)
// => Copying 3 files.
By default a newline will be added after each message. This can be changed globally or for each single log.
const log = create('my-pkg', 'blue', false) // newLine = false
log('Hello World', { newLine: true }) // Force newLine for this message.
FAQs
Logging utility for node.
We found that logua demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.