matterbridge 2.1.5-dev.6 → 2.1.5-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/frontend.js +7 -1
- package/dist/matterbridge.js +7 -0
- package/dist/pluginManager.js +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/frontend.js
CHANGED
|
@@ -134,7 +134,13 @@ export class Frontend {
|
|
|
134
134
|
this.webSocketServer = new WebSocketServer(hasParameter('ssl') ? { server: this.httpsServer } : { server: this.httpServer });
|
|
135
135
|
this.webSocketServer.on('connection', (ws, request) => {
|
|
136
136
|
const clientIp = request.socket.remoteAddress;
|
|
137
|
-
|
|
137
|
+
let callbackLogLevel = "notice";
|
|
138
|
+
if (this.matterbridge.matterbridgeInformation.loggerLevel === "info" || this.matterbridge.matterbridgeInformation.matterLoggerLevel === MatterLogLevel.INFO)
|
|
139
|
+
callbackLogLevel = "info";
|
|
140
|
+
if (this.matterbridge.matterbridgeInformation.loggerLevel === "debug" || this.matterbridge.matterbridgeInformation.matterLoggerLevel === MatterLogLevel.DEBUG)
|
|
141
|
+
callbackLogLevel = "debug";
|
|
142
|
+
AnsiLogger.setGlobalCallback(this.wssSendMessage.bind(this), callbackLogLevel);
|
|
143
|
+
this.log.debug(`WebSocketServer logger global callback set to ${callbackLogLevel}`);
|
|
138
144
|
this.log.info(`WebSocketServer client "${clientIp}" connected to Matterbridge`);
|
|
139
145
|
ws.on('message', (message) => {
|
|
140
146
|
this.wsMessageHandler(ws, message);
|
package/dist/matterbridge.js
CHANGED
|
@@ -249,6 +249,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
249
249
|
this.log.logLevel = await this.nodeContext.get('matterbridgeLogLevel', "info");
|
|
250
250
|
}
|
|
251
251
|
MatterbridgeEndpoint.logLevel = this.log.logLevel;
|
|
252
|
+
this.matterbridgeInformation.loggerLevel = this.log.logLevel;
|
|
252
253
|
if (hasParameter('filelogger') || (await this.nodeContext.get('matterbridgeFileLog', false))) {
|
|
253
254
|
AnsiLogger.setGlobalLogfile(path.join(this.matterbridgeDirectory, this.matterbrideLoggerFile), this.log.logLevel, true);
|
|
254
255
|
this.matterbridgeInformation.fileLogger = true;
|
|
@@ -285,6 +286,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
285
286
|
}
|
|
286
287
|
Logger.format = MatterLogFormat.ANSI;
|
|
287
288
|
Logger.setLogger('default', this.createMatterLogger());
|
|
289
|
+
this.matterbridgeInformation.matterLoggerLevel = Logger.defaultLogLevel;
|
|
288
290
|
if (hasParameter('matterfilelogger') || (await this.nodeContext.get('matterFileLog', false))) {
|
|
289
291
|
this.matterbridgeInformation.matterFileLogger = true;
|
|
290
292
|
Logger.addLogger('matterfilelogger', await this.createMatterFileLogger(path.join(this.matterbridgeDirectory, this.matterLoggerFile), true), {
|
|
@@ -926,6 +928,9 @@ export class Matterbridge extends EventEmitter {
|
|
|
926
928
|
for (const plugin of this.plugins) {
|
|
927
929
|
await this.removeAllBridgedEndpoints(plugin.name);
|
|
928
930
|
}
|
|
931
|
+
this.log.debug('Waiting for the MessageExchange to finish...');
|
|
932
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
933
|
+
this.log.debug('Cleaning up and shutting down...');
|
|
929
934
|
await this.cleanup('unregistered all devices and shutting down...', false);
|
|
930
935
|
}
|
|
931
936
|
async shutdownProcessAndReset() {
|
|
@@ -969,6 +974,8 @@ export class Matterbridge extends EventEmitter {
|
|
|
969
974
|
}
|
|
970
975
|
}
|
|
971
976
|
this.log.notice(`Stopping matter server nodes in ${this.bridgeMode} mode...`);
|
|
977
|
+
this.log.debug('Waiting for the MessageExchange to finish...');
|
|
978
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
972
979
|
if (this.bridgeMode === 'bridge') {
|
|
973
980
|
if (this.serverNode) {
|
|
974
981
|
await this.stopServerNode(this.serverNode);
|
package/dist/pluginManager.js
CHANGED
|
@@ -450,7 +450,7 @@ export class PluginManager {
|
|
|
450
450
|
plugin.configJson = config;
|
|
451
451
|
plugin.schemaJson = await this.loadSchema(plugin);
|
|
452
452
|
await this.saveToStorage();
|
|
453
|
-
this.log.notice(`Loaded plugin ${plg}${plugin.name}${
|
|
453
|
+
this.log.notice(`Loaded plugin ${plg}${plugin.name}${nt} type ${typ}${platform.type}${nt} (entrypoint ${UNDERLINE}${pluginEntry}${UNDERLINEOFF})`);
|
|
454
454
|
if (start)
|
|
455
455
|
await this.start(plugin, message, false);
|
|
456
456
|
if (configure)
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "2.1.5-dev.
|
|
3
|
+
"version": "2.1.5-dev.8",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge",
|
|
9
|
-
"version": "2.1.5-dev.
|
|
9
|
+
"version": "2.1.5-dev.8",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@matter/main": "0.12.3",
|