https://github.com/prantadas/express-pulse-logger
A simple logger for Express.Js
https://github.com/prantadas/express-pulse-logger
Last synced: 3 months ago
JSON representation
A simple logger for Express.Js
- Host: GitHub
- URL: https://github.com/prantadas/express-pulse-logger
- Owner: PrantaDas
- License: mit
- Created: 2024-04-28T20:50:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-13T17:45:15.000Z (over 1 year ago)
- Last Synced: 2025-07-08T18:07:20.235Z (3 months ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/express-pulse-logger
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# express-pulse-logger
**express-pulse-logger** is a logging middleware for Express.js applications, providing detailed insights into incoming requests, server responses, CPU usage, and memory consumption.
- **Request Logging:** Logs incoming requests including IP address, user-agent, HTTP method, URL, content length,the time of prcessing each incoming request and response status code.
- **Response Logging:** Records server responses including HTTP version, response time, and bandwidth.
- **Enhanced Logging:** Built upon the logging mechanisms of Morgan and Tslog, ensuring robust and customizable logging functionality.
- **CPU and Memory Monitoring:** Unique feature to monitor CPU usage and memory consumption, providing valuable insights into server performance.# Installation
You can install **express-pulse-logger** using `npm`, `yarn`, `pnpm`.## npm
```sh
npm i express-pulse-logger
```## pnpm
```sh
pnpm install express-pulse-logger
```## yarn
```sh
yarn add express-pulse-logger
```# Example
```ts
import { statsLogger } from "express-pulse-logger";import express from 'express';
const app = express();
app.use(statsLogger({ clearLog: '1D' }));app.get('/', (_req, res) => {
return res.status(200).send('ok');
});app.listen(5000);
```## Note
This is my first time publishing a package, and while I've put effort into creating something new and useful, there may be mistakes or areas for improvement. I appreciate your understanding and welcome any feedback or suggestions you may have. Thank you for giving **express-pulse-logger** a try!