mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 23:33:12 +09:00
Prefer putting nested structures on new lines
Format arguments to have nested structures start on a new line instead of inline to make it easier to see where the structures starts and what structure it is.
This commit is contained in:
1 parent
cb21a63ac2
commit
156d517976
7 files changed
+130
-77
No files matched your search
+21
-13
@@ -36,11 +36,15 @@ class ControlConnector extends libLink.WebSocketClientConnector {
|
||||
|
||||
register() {
|
||||
logger.verbose("Connector | registering control");
|
||||
this.sendHandshake(new libData.MessageRegisterControl(new libData.RegisterControlData(
|
||||
this._token,
|
||||
"clusterioctl",
|
||||
version,
|
||||
)));
|
||||
this.sendHandshake(
|
||||
new libData.MessageRegisterControl(
|
||||
new libData.RegisterControlData(
|
||||
this._token,
|
||||
"clusterioctl",
|
||||
version,
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,9 +91,11 @@ class Control extends libLink.Link {
|
||||
instanceIds = [],
|
||||
maxLevel = null,
|
||||
}) {
|
||||
await this.send(new libData.LogSetSubscriptionsRequest(
|
||||
all, controller, hostIds, instanceIds, maxLevel,
|
||||
));
|
||||
await this.send(
|
||||
new libData.LogSetSubscriptionsRequest(
|
||||
all, controller, hostIds, instanceIds, maxLevel,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
async handleLogMessageEvent(event) {
|
||||
@@ -166,11 +172,13 @@ async function startControl() {
|
||||
let args = yargs.parse();
|
||||
|
||||
// Log stream for the ctl session.
|
||||
logger.add(new ConsoleTransport({
|
||||
errorLevels: Object.keys(levels),
|
||||
level: args.logLevel,
|
||||
format: new libLoggingUtils.TerminalFormat(),
|
||||
}));
|
||||
logger.add(
|
||||
new ConsoleTransport({
|
||||
errorLevels: Object.keys(levels),
|
||||
level: args.logLevel,
|
||||
format: new libLoggingUtils.TerminalFormat(),
|
||||
})
|
||||
);
|
||||
libLoggingUtils.handleUnhandledErrors(logger);
|
||||
|
||||
logger.verbose(`Loading available plugins from ${args.pluginList}`);
|
||||
|
||||
Reference in new issue
Block a user