
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
@tinyhttp/logger
Advanced tools
Simple HTTP logger for tinyhttp.
pnpm i @tinyhttp/logger
import { logger } from '@tinyhttp/logger'
logger(options)Returns the middleware to log HTTP requests.
methods - a list of HTTP methods to log. Defaults to http's METHODStimestamp.format - timestamp format. Gets consumed by dayjs library. If a string specified, used as a format, otherwise just enables it.output.callback - function that recieves the log generated by the logger.output.color - property that determines if the logger will generate a message with color. usefull for logging into the console, disable it if logging into file / http / etc...emoji - enable emojis for HTTP status code. See http-status-emojis for a full listip - log IP addressimport { App } from '@tinyhttp/app'
import { logger } from '@tinyhttp/logger'
new App()
.use(
logger({
methods: ['GET', 'POST'],
timestamp: { format: 'HH:mm:ss' },
output: { callback: console.log, color: false }
})
)
.get('/', (req, res) => res.send('Hello world'))
.post('/', (req, res) => res.send('Sent POST'))
.listen(3000)
FAQs
Minimal and flexible HTTP logger.
The npm package @tinyhttp/logger receives a total of 51,013 weekly downloads. As such, @tinyhttp/logger popularity was classified as popular.
We found that @tinyhttp/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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.