
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@remix-run/logger-middleware
Advanced tools
HTTP request/response logging middleware for Remix. It logs request metadata and response details with configurable output formats.
npm i remix
import { createRouter } from 'remix/fetch-router'
import { logger } from 'remix/logger-middleware'
let router = createRouter({
middleware: [logger()],
})
// Logs: [19/Nov/2025:14:32:10 -0800] GET /users/123 200 1234
You can use the format option to customize the log format. The following tokens are available:
%date - Date and time in Apache/nginx format (dd/Mon/yyyy:HH:mm:ss ±zzzz)%dateISO - Date and time in ISO format%duration - Request duration in milliseconds%contentLength - Response Content-Length header%contentType - Response Content-Type header%host - Request URL host%hostname - Request URL hostname%method - Request method%path - Request pathname + search%pathname - Request pathname%port - Request port%query - Request query string (search)%referer - Request Referer header%search - Request search string%status - Response status code%statusText - Response status text%url - Full request URL%userAgent - Request User-Agent headerlet router = createRouter({
middleware: [
logger({
format: '%method %path - %status (%duration ms)',
}),
],
})
// Logs: GET /users/123 - 200 (42 ms)
For Apache-style combined log format, you can use the following format:
let router = createRouter({
middleware: [
logger({
format: '%host - - [%date] "%method %path" %status %contentLength "%referer" "%userAgent"',
}),
],
})
You can use a custom logger to write logs to a file or other stream.
import { createWriteStream } from 'node:fs'
let logStream = createWriteStream('access.log', { flags: 'a' })
let router = createRouter({
middleware: [
logger({
log(message) {
logStream.write(message + '\n')
},
}),
],
})
fetch-router - Router for the web Fetch APISee LICENSE
FAQs
Middleware for logging HTTP requests and responses
We found that @remix-run/logger-middleware demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

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.