simple HTTP logger for tinyhttp

Usage no npm install needed!

<script type="module">
  import tinyhttpLogger from 'https://cdn.skypack.dev/@tinyhttp/logger';



npm (scoped) npm

Simple HTTP logger.


pnpm i @tinyhttp/logger


import { logger } from '@tinyhttp/logger'


Returns the middleware to log HTTP requests.


  • methods - a list of HTTP methods to log. Defaults to http's METHODS
  • timestamp.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 list
  • ip - log IP address


import { App } from '@tinyhttp/app'
import { logger } from '@tinyhttp/logger'

new App()
      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'))


  • Pino - super fast, all natural json logger.
  • Zoya - Truly highly composable logging utility.
  • Morgan - HTTP request logger middleware for node.js
  • concurrency-logger - Log HTTP requests/responses separately, visualize their concurrency and report logs/errors in context of a request
  • Volleyball - Tiny HTTP logger for Express showing asynchronous requests and responses