{"repo":"tinyhttp/logger","free":true,"listed":false,"github":"https://github.com/tinyhttp/logger","clone":"git clone https://github.com/tinyhttp/logger.git","description":"🪵 Minimal and flexible HTTP logger","language":"TypeScript","stars":10,"topics":["logger","http","nodejs","esm","javascript","tinyhttp","logging"],"license":"MIT","category":"analytics","readme_excerpt":"@tinyhttp/logger [![npm][npm-img]][npm-url] [![GitHub Workflow Status][gh-actions-img]][github-actions] [![Coverage][cov-img]][cov-url] Minimal and flexible HTTP logger Install API logger(options) Returns the middleware for logging HTTP requests. Options - methods : a list of HTTP methods to log. Defaults to http 's METHODS . - timestamp.format : timestamp format. It is consumed by the dayjs library. If a string is specified, it is used as a format; otherwise just enabled. - output.callback : a function that receives the log generated by the logger. - output.color : a property that determines whether the logger will generate a message with color. Useful for logging into the console; disable if logging into a file or other colorless environments. - emoji : enable emojis for HTTP status codes. See http-status-emojis for a full list. - ip : log IP address. Example To Log a level, use the enum LogLevel This also includes a simple file logger. To stream to a file, simply supply the filename in the options. Supported file names innclude ./file.log or ./log/tiny.log Alternatives - Pino HTTP - high-speed HTTP logger for Node.js - chrona - Simple HTTP request logger middleware for express.js inspired from koa-logger, written in typescript. [npm-url]: https://npmjs.com/package/@tinyhttp/logger [github-actions]: https://github.com/tinyhttp/logger/actions [gh-actions-img]: https://img.shields.io/github/actions/workflow/status/tinyhttp/logger/ci.yml?branch=master&style=for-the-badge&color","default_branch":null,"files":null,"tree":[],"storefront":"/r/tinyhttp","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tinyhttp/logger/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}