refactor: show logs to each application and database

This commit is contained in:
Mauricio Siu
2024-09-09 00:14:08 -06:00
parent ea5349c844
commit cf06162be7
6 changed files with 66 additions and 46 deletions

View File

@@ -20,7 +20,6 @@ export const executeCommand = async (serverId: string, command: string) => {
}
stream
.on("close", (code, signal) => {
console.log("Connection closed ✅");
client.end();
if (code === 0) {
resolve();
@@ -28,12 +27,8 @@ export const executeCommand = async (serverId: string, command: string) => {
reject(new Error(`Command exited with code ${code}`));
}
})
.on("data", (data: string) => {
console.log(`OUTPUT: ${data.toString()}`);
})
.stderr.on("data", (data) => {
console.error(`STDERR: ${data.toString()}`);
});
.on("data", (data: string) => {})
.stderr.on("data", (data) => {});
});
})
.connect({