forked from svrjs/svrjs
Change serverconsole.js, so it no longer exports the constructor, just serverconsole object.
This commit is contained in:
parent
3a8cdccc0d
commit
e1b6ca8803
2 changed files with 3 additions and 8 deletions
|
@ -77,7 +77,7 @@ if (process.serverConfig.optOutOfStatisticsServer === undefined) process.serverC
|
||||||
|
|
||||||
process.serverConfig.version = version; // Compatiblity for very old SVR.JS mods
|
process.serverConfig.version = version; // Compatiblity for very old SVR.JS mods
|
||||||
|
|
||||||
const serverconsoleConstructor = require("./utils/serverconsole.js");
|
const serverconsole = require("./utils/serverconsole.js");
|
||||||
|
|
||||||
let inspectorURL = undefined;
|
let inspectorURL = undefined;
|
||||||
try {
|
try {
|
||||||
|
@ -103,8 +103,6 @@ try {
|
||||||
wwwrootError = err;
|
wwwrootError = err;
|
||||||
}
|
}
|
||||||
|
|
||||||
const serverconsole = serverconsoleConstructor(process.serverConfig.enableLogging);
|
|
||||||
|
|
||||||
let middleware = [
|
let middleware = [
|
||||||
require("./middleware/core.js"),
|
require("./middleware/core.js"),
|
||||||
require("./middleware/urlSanitizer.js"),
|
require("./middleware/urlSanitizer.js"),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
let enableLoggingIntoFile = false;
|
let enableLoggingIntoFile = process.serverConfig.enableLogging;
|
||||||
let logFile = undefined;
|
let logFile = undefined;
|
||||||
let logSync = false;
|
let logSync = false;
|
||||||
let cluster = require("./clusterBunShim.js");
|
let cluster = require("./clusterBunShim.js");
|
||||||
|
@ -271,7 +271,4 @@ process.exit = function (code) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = (enableLoggingIntoFileParam) => {
|
module.exports = serverconsole;
|
||||||
enableLoggingIntoFile = enableLoggingIntoFileParam;
|
|
||||||
return serverconsole;
|
|
||||||
};
|
|
||||||
|
|
Reference in a new issue