Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

errsole

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

errsole - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

lib/main/server/controllers/appController.js

5

lib/main/index.js

@@ -16,6 +16,7 @@ 'use strict';

ExpressApp.listen(port, () => {
console.log('(✓) Errsole with built-in dashboard is running on ' + port);
const basePath = options.path || '';
console.log('Errsole Dashboard is accessible at http://localhost:' + port + basePath);
});
} else {
console.log('(×) Errsole built-in dashboard is disabled at initialization');
console.log('Errsole Dashboard is disabled: You have disabled the Errsole Dashboard in the Errsole module configuration.');
}

@@ -22,0 +23,0 @@ };

29

lib/main/logs/index.js

@@ -25,16 +25,14 @@ const stream = require('stream');

this.collectLogs = options.collectLogs || ['info', 'error'];
let capturingAnyLogs = false;
if (this.collectLogs.includes(LogLevel.INFO)) {
this.captureLogs(LogLevel.INFO);
console.log('(✓) INFO level logs are now being monitored.');
capturingAnyLogs = true;
console.log('Errsole is capturing INFO logs.');
} else {
console.log('Errsole is NOT capturing INFO logs.');
}
if (this.collectLogs.includes(LogLevel.ERROR)) {
this.captureLogs(LogLevel.ERROR);
console.log('(✓) ERROR level logs are now being monitored.');
capturingAnyLogs = true;
console.log('Errsole is capturing ERROR logs.');
} else {
console.log('Errsole is NOT capturing ERROR logs.');
}
if (!capturingAnyLogs) {
console.log('(×) No logs will be captured.');
}
};

@@ -44,2 +42,13 @@

const self = this;
if (self.storage.once) {
self.storage.once('ready', function () {
if (!self.enableConsoleOutput) {
const writeFunction = level === LogLevel.INFO ? process.stdout : process.stderr;
writeFunction.write = function () {
const argsArray = Array.from(arguments);
logBuffer.write.apply(logBuffer, argsArray);
};
}
});
}
const logBuffer = new stream.Writable();

@@ -58,5 +67,3 @@ logBuffer._write = (chunk, encoding, done) => {

const argsArray = Array.from(arguments);
if (self.enableConsoleOutput) {
originalWrite.apply(writeFunction, argsArray);
}
originalWrite.apply(writeFunction, argsArray);
logBuffer.write.apply(logBuffer, argsArray);

@@ -63,0 +70,0 @@ };

@@ -11,5 +11,2 @@ const express = require('express');

app.use('/dist', express.static(path.join(__dirname, '..', '..', 'web', 'dist')));
app.use('/assets', express.static(path.join(__dirname, '..', '..', 'web', 'assets')));
app.addStorage = function (options) {

@@ -22,4 +19,10 @@ initializeStorageConnection(options.storage);

app.use(basePath, apiRoutes);
let filePath = basePath;
if (!filePath.endsWith('/')) {
filePath += '/';
}
app.use(filePath + 'dist', express.static(path.join(__dirname, '..', '..', 'web', 'dist')));
app.use(filePath + 'assets', express.static(path.join(__dirname, '..', '..', 'web', 'assets')));
};
module.exports = app;

@@ -5,2 +5,3 @@ const express = require('express');

const logController = require('../controllers/logController');
const appController = require('../controllers/appController');
const auth = require('../middleware/auth');

@@ -19,2 +20,3 @@

router.delete('/api/users/:userId', auth.authenticateToken, userController.removeUser);
router.get('/api/apps/check-updates', auth.authenticateToken, appController.checkUpdates);

@@ -21,0 +23,0 @@ router.get('/api/logs', auth.authenticateToken, logController.getLogs);

@@ -12,2 +12,3 @@ const JSONAPISerializer = require('json-api-serializer');

Serializer.register(Jsonapi.UserType, {});
Serializer.register(Jsonapi.AppType, {});
Serializer.register(Jsonapi.Logs, {

@@ -14,0 +15,0 @@ topLevelMeta: function (data, meta) {

{
"name": "errsole",
"version": "2.1.0",
"version": "2.1.1",
"description": "Logger with a Built-in Web Dashboard",
"keywords": [
"log",
"logs",
"logging",
"logger",
"loglevel"
"logger"
],

@@ -29,2 +29,3 @@ "homepage": "https://github.com/errsole/errsole.js",

"dependencies": {
"axios": "^1.6.8",
"body-parser": "^1.20.2",

@@ -41,3 +42,2 @@ "express": "^4.17.1",

"antd": "^3.26.18",
"axios": "^1.6.8",
"babel": "^6.23.0",

@@ -44,0 +44,0 @@ "babel-core": "^6.26.3",

<p align="center">
<img src="https://github.com/errsole/errsole.js/assets/3775513/e7499016-cb28-488d-a47d-f1ba24804d2b" width="256"/>
<h3 align="center">Node.js Logger with a Built-in Web Dashboard</h3>
<h3 align="center">Node.js logger with a built-in web dashboard.</h3>
</p>
Errsole is a Node.js logger with a built-in web dashboard. In this dashboard, you can easily view, filter, and search your app logs.
Errsole is an open-source logger for Node.js. It has a built-in web dashboard to view, filter, and search your app logs.
https://github.com/errsole/errsole.js/assets/3775513/b8d7025d-9b82-464a-954a-8e27be51fd3a
## Features
* **Easy Setup:** Just insert the Errsole code snippet at the beginning of your app's main file. That's it!
* **Automated Log Collection:** Errsole automatically collects all your app logs directly from the Node.js console.
* **Centralized Logging:** Errsole consolidates all your app logs from multiple servers into one centralized database. You can choose your preferred database system.
* **Interactive Web Dashboard:** Easily view, filter, and search your app logs using the Errsole web dashboard.
* **Secure Access Control:** Errsole comes with built-in authentication, ensuring that only you and your authorized development team can access the logs.

@@ -20,2 +26,7 @@

* [Errsole with MongoDB](docs/mongodb-storage.md)
* [Errsole with MySQL](docs/mysql-storage.md)
* [Errsole with PostgreSQL](docs/postgresql-storage.md)
* [Errsole with SQLite](docs/sqlite-storage.md)
* [Errsole with MariaDB](docs/mariadb-storage.md)
* [Errsole with OracleDB](docs/oracledb-storage.md)

@@ -22,0 +33,0 @@ ## Web Dashboard

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc