
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
View the server logs on browser. Logram enables easy transport of server logs to browser.
Logram will transport your server logs to browser.
Most of the time developer might need acess to server logs to debug live issues. And if the server access is denied for dev's they have to relay on the logs sent by admin. Well, logram can help us in that situation. Any log file can be streamed realtime to browser.
Logram have two part, one is the server module and the other is client module. The entire stack is written on JavaScript.
NodeJS is to be installed on your system to get started with the logram.
Logram you can add as a module to your project or it can be a standalone application. If you are adding to your existing project its fairly straight forward implementation. On the other hand if you need to run as stand-alone application it is reccomended to run with some process managers. We will discuss both the cases here.
We will be using PM2 process manager to run our project.
npm install pm2 -g
Then install logram in a desired directory
mkdir logram-root
cd logram-root
npm install logram
Inorder to run logram, we need a configuration file. Then contents of the configuration file determines the log which logram needs to print. A sample configuration file is given below.
{
"logFile" : "/var/log/apache2/access.log",
"errorFile" : "/var/log/apache2/error.log",
"port" : 9887
}
This file can be stored in the root folder and passed as an argument to the logram
. Or it can be
added as a json object directly. Here we will add it directly.
A sample code of index.js file would look like this.
const logram = require('logram');
const config = {
"logFile" : "/var/log/apache2/access.log",
"errorFile" : "/var/log/apache2/error.log",
"port" : 9887
}
logram.run(config);
Then on the command line run
pm2 start index.js --name logram
Now if you go to http://your-ip:9887 you could see the logram braodcasting the logs.
The main intention of logram was make it flexible to use it in an ongoing nodejs projects. Below documentation will help in enabling logram in an existing project.
All we have to do is add the below code to your index.js
file.
const logram = require('logram');
const config = {
"logFile" : "/var/log/apache2/access.log",
"errorFile" : "/var/log/apache2/error.log",
"port" : 9887
}
logram.run(config);
Feel free to send pull request, We will review and accept the request.
This project is licensed under the MIT License.
FAQs
View the server logs on browser. Logram enables easy transport of server logs to browser.
We found that logram demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.