mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 23:30:41 +09:00
Merge pull request #748 from Cooldude2606/feature/console-log
Add config option for console logging
This commit is contained in:
4 files changed
+27
No files matched your search
@@ -218,6 +218,7 @@ export default class Instance extends lib.Link {
|
||||
enableWhitelist: this.config.get("factorio.enable_whitelist"),
|
||||
enableAuthserverBans: this.config.get("factorio.enable_authserver_bans"),
|
||||
verboseLogging: this.config.get("factorio.verbose_logging"),
|
||||
consoleLogging: this.config.get("factorio.console_logging"),
|
||||
stripPaths: this.config.get("factorio.strip_paths"),
|
||||
maxConcurrentCommands: this.config.get("factorio.max_concurrent_commands"),
|
||||
shutdownTimeoutMs: this.config.get("factorio.shutdown_timeout") * 1000,
|
||||
|
||||
@@ -438,6 +438,8 @@ export interface FactorioServerOptions {
|
||||
enableAuthserverBans?: boolean,
|
||||
/** Enable verbose logging. */
|
||||
verboseLogging?: boolean,
|
||||
/** Enable console logging. */
|
||||
consoleLogging?: boolean,
|
||||
/** Strip paths in the console. */
|
||||
stripPaths?: boolean,
|
||||
/**
|
||||
@@ -486,6 +488,8 @@ export class FactorioServer extends events.EventEmitter {
|
||||
enableAuthserverBans: boolean;
|
||||
/** Enable verbose logging */
|
||||
verboseLogging: boolean;
|
||||
/** Enable console logging */
|
||||
consoleLogging: boolean;
|
||||
_shutdownTimeoutMs = 0;
|
||||
_stopTimeoutId?: ReturnType<typeof setTimeout>;
|
||||
|
||||
@@ -541,6 +545,8 @@ export class FactorioServer extends events.EventEmitter {
|
||||
this.enableAuthserverBans = options.enableAuthserverBans || false;
|
||||
/** Enable verbose logging */
|
||||
this.verboseLogging = options.verboseLogging || false;
|
||||
/** Enable console logging */
|
||||
this.consoleLogging = options.consoleLogging || false;
|
||||
/** Maximum number of RCON commands transmitted in parallel on the RCON connection */
|
||||
this.maxConcurrentCommands = options.maxConcurrentCommands || 5;
|
||||
if (options.shutdownTimeoutMs !== undefined) {
|
||||
@@ -973,6 +979,7 @@ export class FactorioServer extends events.EventEmitter {
|
||||
...(this.enableWhitelist ? ["--use-server-whitelist"] : []),
|
||||
...(this.enableAuthserverBans ? ["--use-authserver-bans"] : []),
|
||||
...(this.verboseLogging ? ["--verbose"] : []),
|
||||
...(this.consoleLogging ? ["--console-log", this.writePath("console.log")] : []),
|
||||
],
|
||||
{
|
||||
detached: true,
|
||||
|
||||
Reference in new issue
Block a user