Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@bug-fix/workers-logger
Advanced tools
A fast and effective logging framework for Cloudflare Workers
diary
npm add workers-logger
import { track } from 'workers-logger';
addEventListener('fetch', (event) => {
const { request } = event;
const log = track(request);
log.info('gearing up to make a response');
const res = new Response('hi there');
event.waitUntil(log.report(res));
return res;
});
to see more visit examples
Returns log functions and our .report
method.
Returns a promise with intended usage with event.waitUntil
. And thus in terns runs your reporter
defined on track.
A reporter is a single function ran at then end of .report
. And gives you the ability to
send that data somewhere, or merely into
dashboard logs.
import type { Reporter } from 'workers-logger';
import { track } from 'workers-logger';
const reporter: Reporter = (events, { req, res }) => {
// do whatever you want
};
addEventListener('fetch', (event) => {
const { request } = event;
const log = track(request, 'my-worker', reporter);
log.info('gearing up to make a response');
const res = new Response('hi there');
event.waitUntil(log.report(res));
return res;
});
example when sending into Logflare at /examples/workers/logflare
MIT © Marais Rossouw
FAQs
A fast and effective logging framework for Cloudflare Workers
We found that @bug-fix/workers-logger demonstrated a healthy version release cadence and project activity because the last version was released less than 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.