chore(logs): demote noisy native messaging logs to debug level
CI / Build & Test (push) Successful in 2m56s
CI / Build & Test (push) Successful in 2m56s
"Sending to native" and "Received from native" are emitted on every poll cycle and clutter the logs panel. Moved both to debugLog so they only appear when Debug Mode is enabled in Settings.
This commit is contained in:
@@ -32,7 +32,7 @@ function send(msg) {
|
||||
const id = msg.id || `req_${Date.now()}_${Math.random().toString(36).slice(2)}`;
|
||||
msg.id = id;
|
||||
debugLog('send: id=', id, 'type=', msg.type, 'payload=', msg.payload && JSON.stringify(msg.payload));
|
||||
log('Sending to native:', msg.type, msg.payload?.swarmId || '', msg.payload?.connId || '');
|
||||
debugLog('Sending to native:', msg.type, msg.payload?.swarmId || '', msg.payload?.connId || '');
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!port) {
|
||||
debugLog('send: no port, rejecting');
|
||||
@@ -140,7 +140,7 @@ function connect() {
|
||||
|
||||
port.onMessage.addListener((msg) => {
|
||||
debugLog('onMessage: full msg=', JSON.stringify(msg));
|
||||
log('Received from native:', msg.type, msg.event || '');
|
||||
debugLog('Received from native:', msg.type, msg.event || '');
|
||||
|
||||
if (msg.type === 'event') {
|
||||
const payload = msg.payload || {};
|
||||
|
||||
Reference in New Issue
Block a user