PM2 Log Viewer is a web application built with Node.js and Express for managing and viewing logs of processes managed by PM2.
Now, viewing your self-hosted apps and managing logs is easier than ever!
Clone the repository:
git clone https://github.com/your/repository.git
cd repository
Install dependencies:
npm install
Set up environment variables:
Create a .env
file in the root directory with the following content:
PM2_HOME=C:\Users\Intel\.pm2
PORT=3002
ADMIN_USERNAME=admin
ADMIN_PASSWORD=password
Adjust the values according to your environment setup.
Start the server with timestamp logging:
pm2 start <server-file> --time
This command starts the server with timestamp logging enabled, showing when each log entry was generated.
Access the PM2 Log Viewer:
Open your web browser and navigate to http://localhost:3002
.
Authenticate:
Use the following credentials to log in:
admin
password
Select a process:
Choose a process from the dropdown list to view its logs in real-time. You can also select a date range to filter logs.
Select a theme:
Change the theme from the dropdown list to switch between Light Mode, Dark Mode, and Retro Mode.
Enhanced Log Filtering:
User Management:
Performance Improvements:
public
directory to customize themes or add new ones..env
file for different PM2 configurations or port settings.Enable timestamps in logs:
pm2 start <server-file> --time
to include timestamps in log entries.Update server without downtime using PM2: If your server is already running and you want to update it without downtime, use PM2 to reload all running processes with timestamps enabled:
pm2 reload all --time
This project is licensed under the MIT License - see the LICENSE file for details.