Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
pino-slack-transport
Advanced tools
This module provides a 'transport' for pino that sends logs to Slack.
yarn install pino-slack-transport
import { createTransport } from 'pino-slack-transport'
// with options defined in pino
export default createTransport
// with options defined in this module
const options = { webhookUrl: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX' }
export default function transport() {
return createTransport(options)
}
import { createTransport } from 'pino-slack-transport'
import { pino } from 'pino'
const options = { webhookUrl: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX' }
const logger = pino(
pino.transport({
targets: [
// { level: 'error', target: '#pino/file', options: { destination: '/dev/stderr' } },
// { level: 'trace', target: '#pino/file', options: { destination: '/dev/stdout' } },
{ level: 'debug', target: '../lib/logger.mjs', options }
]
})
)
channelKey
The string key for the 'channel' in the JSON object.
By default, the channel inherits from the associated Slack app configuration.
colors
Default: { 30: '#2EB67D', 40: '#ECB22E', 50: '#E01E5A', 60: '#E01E5A' }
The mapping from level to color.
excludedKeys
Default: { hostname: 0, pid: 0 }
The string keys excluded from the JSON object.
imageUrlKey
The string key for the image URL in the JSON object.
keepAlive
Keep sockets around so they can be used for future requests without having to reestablish a TCP connection.
messageKey
Default: 'msg'
The string key for the 'message' in the JSON object.
webhookUrl
(required)The Incoming Webhook URL.
FAQs
pino transport that sends logs to Slack
We found that pino-slack-transport 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.