
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.
🛠 A tiny log library that allows you to take events, explanations and solutions and connect them like lego-pieces to create user-friendly logs.
Good log messages increases customer satisfaction, as they work as sort of a guide, helping the user achieve what they wanted to achieve. Good logs minimize the amount of support calls, improve customer satisfaction and trust in your product, ultimately being a win-win for both the creators of software and the users.
Inspired by Vercel's Error design framework, human-logs allows you to take events, explanations and solutions, and connect them like lego-pieces, to create user-friendly logs in a versatile manner.
Focus on understanding the errors.
export const apiLogs = createHumanLogs({
events: {
project_create_failed: 'Cannot create your project',
team_create_failed: 'Cannot create your team',
},
explanations: {
api_unreachable: 'because the API cannot be reached.',
team_exists: {
template: 'because a team with ID "{teamId}" already exists.',
params: {
teamId: ''
}
}
},
solutions: {
check_status_page: {
template: 'You can check the status of our services on our status page.',
params: {},
actions: [
{
text: 'Go to status page',
href: 'https://skosh.dev'
}
]
}
}
})
// You can now use `apiLogs` to create user-friendly error logs, by connecting events, explanations and solutions like lego-blocks.
const log = apiLogs({
event: ['project_create_failed'],
explanation: ['api_unreachable'],
solution: ['check_status_page']
})
console.log(log.message)
// => Cannot create your project because the API cannot be reached. You can check the status of our services on our status page.
console.log(log.actions)
/* => [{
text: 'Go to status page',
href: 'https://status.foobar.inc'
}]*/
console.log(log.toString())
// => Cannot create your project because the API cannot be reached. You can check the status of our services on our status page. Go to status page (https://status.foobar.inc)
// Example with parameters
const logWithParams = apiLogs({
event: ['team_create_failed'],
explanation: ['team_exists'],
params: {
teamId: 'winning-team'
}
})
console.log(logWithParams.message)
// => Cannot create your team because a team with ID "winning-team" already exists.
corepack enable (use npm i -g corepack for Node.js < 16.10)pnpm installpnpm devMade with ❤️ in Helsinki
Published under MIT License.
FAQs
Human friendly logs for your APIs & projects.
The npm package human-logs receives a total of 202 weekly downloads. As such, human-logs popularity was classified as not popular.
We found that human-logs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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
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.