diff --git a/src/server/Server.js b/src/server/Server.js index 6c78280..0cb8325 100644 --- a/src/server/Server.js +++ b/src/server/Server.js @@ -53,6 +53,8 @@ class Server extends EventEmitter { if (!httpOpts?.port) return Util.fatal(new Error(`Missing http.port in server options`)); + this.logger = new LoggerClient({ ...options.logger, name: this.constructor.name }); + // Port number is automatically incremented based on shard # this.port = httpOpts.port + this._shardId; // Primarily used by the OAuth methods for the callback url @@ -78,7 +80,6 @@ class Server extends EventEmitter { // Takes care of loading endpoints, all endpoints need to inherit the endpoint class in /interfaces this.registry = new Registry(this, { path: path.join(__dirname, 'endpoints') }); - this.logger = new LoggerClient({ ...options.logger, name: this.constructor.name }); // Mariadb isn't strictly necessary here for anything, it's just here pre-emptively this.mariadb = new MariaDB(this, { options: databases.mariadb, MARIA_HOST, MARIA_USER, MARIA_PORT, MARIA_PASS, MARIA_DB });