mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 00:13:12 +09:00
Add verbose logging option
Add option to pass the --verbose flag to the Factorio server.
This commit is contained in:
1 parent
67654fdf85
commit
c8c65d2e92
4 files changed
+22
No files matched your search
@@ -280,6 +280,14 @@ here overrides the properties there.
|
|||||||
Defaults to {"tags":["clusterio"],"auto_pause":false}.
|
Defaults to {"tags":["clusterio"],"auto_pause":false}.
|
||||||
|
|
||||||
|
|
||||||
|
### factorio.verbose_logging
|
||||||
|
|
||||||
|
Pass the `--verbose` flag to Factorio when starting the server. This
|
||||||
|
prints more messages to the log.
|
||||||
|
|
||||||
|
Defaults to false
|
||||||
|
|
||||||
|
|
||||||
### factorio.strip_paths
|
### factorio.strip_paths
|
||||||
|
|
||||||
Strip down absolute paths in the server log going to files inside the
|
Strip down absolute paths in the server log going to files inside the
|
||||||
|
|||||||
@@ -250,6 +250,12 @@ FactorioGroup.define({
|
|||||||
"auto_pause": false,
|
"auto_pause": false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
FactorioGroup.define({
|
||||||
|
name: "verbose_logging",
|
||||||
|
description: "Enable verbose logging on the Factorio server",
|
||||||
|
type: "boolean",
|
||||||
|
initial_value: false,
|
||||||
|
});
|
||||||
FactorioGroup.define({
|
FactorioGroup.define({
|
||||||
name: "strip_paths",
|
name: "strip_paths",
|
||||||
description: "Strip down instance paths in the log",
|
description: "Strip down instance paths in the log",
|
||||||
|
|||||||
@@ -513,6 +513,8 @@ class FactorioServer extends events.EventEmitter {
|
|||||||
* @param {number} options.gamePort - UDP port to host game on.
|
* @param {number} options.gamePort - UDP port to host game on.
|
||||||
* @param {number} options.rconPort - TCP port to use for RCON.
|
* @param {number} options.rconPort - TCP port to use for RCON.
|
||||||
* @param {string} options.rconPassword - Password use for RCON.
|
* @param {string} options.rconPassword - Password use for RCON.
|
||||||
|
* @param {boolean} options.enableWhitelist - Turn on whitelisting.
|
||||||
|
* @param {boolean} options.verboseLogging - Enable verbose logging.
|
||||||
* @param {boolean} options.stripPaths - Strip paths in the console.
|
* @param {boolean} options.stripPaths - Strip paths in the console.
|
||||||
*/
|
*/
|
||||||
constructor(factorioDir, writeDir, options) {
|
constructor(factorioDir, writeDir, options) {
|
||||||
@@ -534,6 +536,8 @@ class FactorioServer extends events.EventEmitter {
|
|||||||
this.rconPassword = options.rconPassword;
|
this.rconPassword = options.rconPassword;
|
||||||
/** Enable player whitelist */
|
/** Enable player whitelist */
|
||||||
this.enableWhitelist = options.enableWhitelist;
|
this.enableWhitelist = options.enableWhitelist;
|
||||||
|
/** Enable verbose logging */
|
||||||
|
this.verboseLogging = options.verboseLogging;
|
||||||
this._state = "new";
|
this._state = "new";
|
||||||
this._server = null;
|
this._server = null;
|
||||||
this._rconClient = null;
|
this._rconClient = null;
|
||||||
@@ -810,6 +814,7 @@ class FactorioServer extends events.EventEmitter {
|
|||||||
[
|
[
|
||||||
"--config", this.writePath("config.ini"),
|
"--config", this.writePath("config.ini"),
|
||||||
"--create", this.writePath("saves", name),
|
"--create", this.writePath("saves", name),
|
||||||
|
...(this.verboseLogging ? ["--verbose"] : []),
|
||||||
],
|
],
|
||||||
{
|
{
|
||||||
detached: true,
|
detached: true,
|
||||||
@@ -852,6 +857,7 @@ class FactorioServer extends events.EventEmitter {
|
|||||||
"--rcon-port", this.rconPort,
|
"--rcon-port", this.rconPort,
|
||||||
"--rcon-password", this.rconPassword,
|
"--rcon-password", this.rconPassword,
|
||||||
...(this.enableWhitelist ? ["--use-server-whitelist"] : []),
|
...(this.enableWhitelist ? ["--use-server-whitelist"] : []),
|
||||||
|
...(this.verboseLogging ? ["--verbose"] : []),
|
||||||
],
|
],
|
||||||
{
|
{
|
||||||
detached: true,
|
detached: true,
|
||||||
@@ -886,6 +892,7 @@ class FactorioServer extends events.EventEmitter {
|
|||||||
"--rcon-port", this.rconPort,
|
"--rcon-port", this.rconPort,
|
||||||
"--rcon-password", this.rconPassword,
|
"--rcon-password", this.rconPassword,
|
||||||
...(this.enableWhitelist ? ["--use-server-whitelist"] : []),
|
...(this.enableWhitelist ? ["--use-server-whitelist"] : []),
|
||||||
|
...(this.verboseLogging ? ["--verbose"] : []),
|
||||||
],
|
],
|
||||||
{
|
{
|
||||||
detached: true,
|
detached: true,
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ class Instance extends libLink.Link{
|
|||||||
rconPort: this.config.get("factorio.rcon_port"),
|
rconPort: this.config.get("factorio.rcon_port"),
|
||||||
rconPassword: this.config.get("factorio.rcon_password"),
|
rconPassword: this.config.get("factorio.rcon_password"),
|
||||||
enableWhitelist: this.config.get("factorio.enable_whitelist"),
|
enableWhitelist: this.config.get("factorio.enable_whitelist"),
|
||||||
|
verboseLogging: this.config.get("factorio.verbose_logging"),
|
||||||
stripPaths: this.config.get("factorio.strip_paths"),
|
stripPaths: this.config.get("factorio.strip_paths"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user