Clean up logging and remove excessive styling
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user