Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33256103
D14377.1768583566.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D14377.1768583566.diff
View Options
diff --git a/lib/components/debug-logs-context-provider.react.js b/lib/components/debug-logs-context-provider.react.js
--- a/lib/components/debug-logs-context-provider.react.js
+++ b/lib/components/debug-logs-context-provider.react.js
@@ -16,9 +16,12 @@
const addLog = React.useCallback(
(title: string, message: string) => {
+ console.log(`${title}: ${message}`);
+
if (!isCurrentUserStaff && !isDev) {
return;
}
+
setLogs(prevLogs => [
...prevLogs,
{
diff --git a/lib/tunnelbroker/use-peer-to-peer-message-handler.js b/lib/tunnelbroker/use-peer-to-peer-message-handler.js
--- a/lib/tunnelbroker/use-peer-to-peer-message-handler.js
+++ b/lib/tunnelbroker/use-peer-to-peer-message-handler.js
@@ -217,11 +217,6 @@
}
if (!deviceKeys) {
- console.log(
- 'Error creating inbound session with device ' +
- `${senderDeviceID}: No keys for the device, ` +
- `session version: ${sessionVersion}`,
- );
addLog(
'Error creating inbound session with device',
`${senderDeviceID}: No keys for the device, ` +
@@ -274,11 +269,6 @@
await resendPeerToPeerMessages(senderDeviceID);
}
} else {
- console.log(
- 'Error creating inbound session with device ' +
- `${senderDeviceID}: ${errorMessage}, ` +
- `session version: ${sessionVersion}`,
- );
addLog(
'Error creating inbound session with device ',
`${senderDeviceID}: ${errorMessage}, ` +
@@ -333,10 +323,6 @@
}
}
- console.log(
- 'Error decrypting message from device ' +
- `${message.senderInfo.deviceID}: ${errorMessage}`,
- );
addLog(
'Error decrypting message from device',
`${message.senderInfo.deviceID}: ${errorMessage}`,
diff --git a/native/account/qr-auth/primary-device-qr-auth-context-provider.js b/native/account/qr-auth/primary-device-qr-auth-context-provider.js
--- a/native/account/qr-auth/primary-device-qr-auth-context-provider.js
+++ b/native/account/qr-auth/primary-device-qr-auth-context-provider.js
@@ -181,13 +181,11 @@
});
await sendDeviceListUpdateSuccessMessage();
} catch (err) {
- const errorTitle =
+ addLog(
`Error while replacing device ${keyserverDeviceID ?? ''}` +
- ` with ${targetDeviceID}: `;
- const errorMessage = getMessageForException(err) ?? 'unknown error';
-
- console.log(errorTitle, errorMessage);
- addLog(errorTitle, errorMessage);
+ ` with ${targetDeviceID}: `,
+ getMessageForException(err) ?? 'unknown error',
+ );
Alert.alert(
'Adding device failed',
@@ -231,11 +229,10 @@
setConnectingInProgress(false);
const targetDeviceID = secondaryDeviceID.current;
- const errorTitle = `Error adding device ${targetDeviceID ?? ''}: `;
- const errorMessage = getMessageForException(err) ?? 'unknown error';
-
- console.log(errorTitle, errorMessage);
- addLog(errorTitle, errorMessage);
+ addLog(
+ `Error adding device ${targetDeviceID ?? ''}`,
+ getMessageForException(err) ?? 'unknown error',
+ );
Alert.alert('Adding device failed', 'Failed to update the device list', [
{ text: 'OK' },
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 16, 5:12 PM (16 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5945389
Default Alt Text
D14377.1768583566.diff (3 KB)
Attached To
Mode
D14377: [lib] add `console.log` in `DebugLogsContextProvider`
Attached
Detach File
Event Timeline
Log In to Comment