Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
a tiny little log formatter for pino.
yeah, i know, pino-colada...
...but is does some weird black box stuff, and i did not like some of the formatting, and i was generally not too happy about certain things, so...
i made pino-tiny!
pino-tiny is ran like any other pino output mangler, you run it as a process and pipe to it. first you need to install it. it's really not meant to be a production log formatter, so prolly install it in your project as a dev-dependency.
npm i -D pino-tiny
...run it with your application that is already using pino to log stuff...
$ node index.js | pino-tiny
...or put it in your package.json
file...
{
...
"scripts": {
"start": "nodemon index.js | pino-tiny",
...
}
}
res
and req
properties in the log data, it will put dimmed request and response info (method, url, status code).pino-tiny runs like a process you pipe the output of your application into and it makes nice output. it also exports a module that returns a start
method that takes a filter
function as a parameter.
this allows you to controll if a log entry gets printed, and you can mangle the output (in the msg
property of the log). here is a ridiculous example:
const { start } = require('pino-tiny')
function filter (data) {
if(data.msg.indexOf('happy') >= 0) {
// nothing happy gets out.
return false;
}
else {
// prepend msg with woah.
return {
...data,
msg: `[woah!] ${data.msg}`
}
}
}
//start the logger
start(filter)
more ideas in examples
FAQs
a tiny little log formatter for [pino](https://github.com/pinojs/pino).
The npm package pino-tiny receives a total of 184 weekly downloads. As such, pino-tiny popularity was classified as not popular.
We found that pino-tiny 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
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.