log-vwer
1.0.0 • Public • Published a few seconds ago
log-vwer is a no-bs, developer-first logging toolkit. It provides a beautiful, responsive, and real-time UI for your application logs with out-of-the-box support for MongoDB, File, and In-Memory storage. Stop console.log-ing into the void. Give your logs a home. In your app.js or server.js, set up the logger and mount the viewer middleware. Start your application and navigate to http://localhost:3000/_logs in your browser. Use the credentials from your auth middleware to log in. This function initializes and returns a logger instance. It takes a single options object. An Express middleware that serves the log viewer UI. It requires the logger instance returned by setupLogger. The logger object returned by setupLogger has the following methods for logging: logger.info(message, [metadata]) logger.warn(message, [metadata]) logger.error(message, [metadata]) logger.debug(message, [metadata]) message (string): The primary log message. metadata (object, optional): A JSON-serializable object containing additional context. Choose the right storage backend for your needs. Your application logs can contain sensitive information. It is highly recommended to protect the log viewer endpoint with authentication and authorization middleware. log-vwer is designed to integrate seamlessly with your existing security setup. Simply add your middleware before viewerMiddleware. This library was built with passion by Qitmeer Raza. Contributions, issues, and feature requests are welcome! Feel free to check the issues page. Distributed under the MIT License. See LICENSE for more information.The ultimate plug-n-play log viewer for Node.js. Go from zero to a production-ready log dashboard in under 2 minutes.
A beautiful, real-time UI for your application logs. No configuration needed.
Step 1: Install the Package
Step 2: Integrate with Express
Option
Type
Required
Default
Description
serviceName
string
Yes
-
A unique name for your application (e.g., 'user-service', 'api-gateway').
store
string
No
'memory'
Storage type. Can be 'mongodb', 'file', or 'memory'.
mongoUrl
string
If store is mongodb
-
The connection string for your MongoDB database.
filePath
string
If store is file
-
The absolute or relative path to the log file (e.g., ./logs/app.log).
telemetry
object
No
null
An optional object for providing anonymous usage analytics. See details.
Backend
Use Case
Pros
Cons
mongodb
Production environments. Scalable applications needing persistent logs.
Highly scalable, powerful querying, persistent.
Requires a separate MongoDB instance.
file
Development & Small Apps. When you need simple, persistent logs.
Easy to set up, human-readable file, portable.
Can be slow at scale, requires log rotation management.
memory
Development & Testing. When you don't need logs to persist.
Blazing fast, zero configuration, no cleanup.
Logs are lost when the application restarts.
.png)


