Added log file

This commit is contained in:
Pax1601
2024-01-04 12:10:01 +01:00
parent 38027b6ff3
commit 7686a60bfd
13 changed files with 135 additions and 106 deletions

View File

@@ -1,4 +1,5 @@
const portfinder = require('portfinder')
const { logger } = require("./filesystem")
/** Checks if a port is already in use
*
@@ -6,7 +7,7 @@ const portfinder = require('portfinder')
function checkPort(port, callback) {
portfinder.getPort({ port: port, stopPort: port }, (err, res) => {
if (err !== null) {
console.error(`Port ${port} already in use`);
logger.error(`Port ${port} already in use`);
callback(false);
} else {
callback(true);