
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
fastify-frontend-logger
Advanced tools
A Fastify plugin for receiving browser logs to a server
pino
"type": "frontend-logger"
to every log.yarn add fastify-frontend-logger
import fastify from 'fastify';
import { frontendLoggerPlugin } from 'fastify-frontend-logger';
const server = fastify();
server.register(frontendLoggerPlugin);
The frontend logger adds a method to your server at /logger
. This consumes a
default logger object:
[
{
"msg": "Hello world",
"level": 30,
"time": 1483531681798,
"ctx": {
"browser": "Firefox"
},
"payload": {
"users": ["cobraz"]
}
}
]
Note: You can change how the logger object is by setting bodySchema
in the
plugin options.
path
can be used to change where the logger is served (defaults to
/logger
).bodySchema
can be used to change the validation schema.preHandler
can be used to run code before passing to logs (e.g.
authentication)loggerOptions
the plugin adds a logger child, with this option you can set
your own.FAQs
A Fastify plugin for receiving browser logs to a server
We found that fastify-frontend-logger 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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.