Clean up logging and remove excessive styling

This commit is contained in:
2025-06-15 17:49:10 -07:00
parent f3367b22dc
commit dab604463f
4 changed files with 19868 additions and 2378 deletions

View File

@@ -23,7 +23,10 @@ class PaperclipRPC {
if (this.logEvents) {
this.logStream.write(`${new Date().toISOString()}: ${text}\n`);
}
console.log("PaperclipRPC:", text);
// Suppress console logging in production
if (process.env.NODE_ENV === 'development') {
console.log("PaperclipRPC:", text);
}
}
async _makeRPCCall(method, params = {}) {
@@ -202,20 +205,20 @@ class PaperclipRPC {
}
startConnection() {
this._writeLog("Starting PaperclipChain RPC connection...");
this._writeLog("Starting PaperclipChain RPC connection");
// Test connection
this.getStatus()
.then(() => {
this._writeLog("Successfully connected to PaperclipChain node");
this._writeLog("Connected to PaperclipChain node");
})
.catch((error) => {
this._writeLog(`Failed to connect to PaperclipChain node: ${error.message}`);
this._writeLog(`Connection failed: ${error.message}`);
});
}
stopConnection() {
this._writeLog("Stopping PaperclipChain RPC connection...");
this._writeLog("Stopping PaperclipChain RPC connection");
this.isConnected = false;
if (this.logStream) {