Clean up logging and remove excessive styling
This commit is contained in:
@@ -23,8 +23,11 @@ class PaperclipRPC {
|
|||||||
if (this.logEvents) {
|
if (this.logEvents) {
|
||||||
this.logStream.write(`${new Date().toISOString()}: ${text}\n`);
|
this.logStream.write(`${new Date().toISOString()}: ${text}\n`);
|
||||||
}
|
}
|
||||||
|
// Suppress console logging in production
|
||||||
|
if (process.env.NODE_ENV === 'development') {
|
||||||
console.log("PaperclipRPC:", text);
|
console.log("PaperclipRPC:", text);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async _makeRPCCall(method, params = {}) {
|
async _makeRPCCall(method, params = {}) {
|
||||||
try {
|
try {
|
||||||
@@ -202,20 +205,20 @@ class PaperclipRPC {
|
|||||||
}
|
}
|
||||||
|
|
||||||
startConnection() {
|
startConnection() {
|
||||||
this._writeLog("Starting PaperclipChain RPC connection...");
|
this._writeLog("Starting PaperclipChain RPC connection");
|
||||||
|
|
||||||
// Test connection
|
// Test connection
|
||||||
this.getStatus()
|
this.getStatus()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this._writeLog("Successfully connected to PaperclipChain node");
|
this._writeLog("Connected to PaperclipChain node");
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this._writeLog(`Failed to connect to PaperclipChain node: ${error.message}`);
|
this._writeLog(`Connection failed: ${error.message}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
stopConnection() {
|
stopConnection() {
|
||||||
this._writeLog("Stopping PaperclipChain RPC connection...");
|
this._writeLog("Stopping PaperclipChain RPC connection");
|
||||||
this.isConnected = false;
|
this.isConnected = false;
|
||||||
|
|
||||||
if (this.logStream) {
|
if (this.logStream) {
|
||||||
|
|||||||
18156
package-lock.json
generated
Normal file
18156
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -62,13 +62,12 @@
|
|||||||
"adm-zip": "^0.5.10",
|
"adm-zip": "^0.5.10",
|
||||||
"app-root-path": "^3.1.0",
|
"app-root-path": "^3.1.0",
|
||||||
"crypto": "^1.0.1",
|
"crypto": "^1.0.1",
|
||||||
"ed25519": "^0.0.4",
|
|
||||||
"electron-storage": "^1.0.7",
|
"electron-storage": "^1.0.7",
|
||||||
"fs-extra": "^10.0.1",
|
"fs-extra": "^10.0.1",
|
||||||
"handlebars": "^4.7.7",
|
"handlebars": "^4.7.7",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"nedb": "^1.8.0",
|
"nedb": "^1.8.0",
|
||||||
"node-fetch": "^3.3.1",
|
"node-fetch": "^2.6.7",
|
||||||
"pull-file-reader": "^1.0.2",
|
"pull-file-reader": "^1.0.2",
|
||||||
"single-instance": "0.0.1",
|
"single-instance": "0.0.1",
|
||||||
"tweetnacl": "^1.0.3",
|
"tweetnacl": "^1.0.3",
|
||||||
|
|||||||
Reference in New Issue
Block a user