push k8s logs to LOG SERVICE IP
parent
e7802b939e
commit
37fc4c1316
|
@ -3295,6 +3295,8 @@ class Kubernetes {
|
||||||
}
|
}
|
||||||
const url = `http://${ip}/api/log`;
|
const url = `http://${ip}/api/log`;
|
||||||
remote_client_logger_1.RemoteClientLogger.log(`Pushing logs to ${url}`);
|
remote_client_logger_1.RemoteClientLogger.log(`Pushing logs to ${url}`);
|
||||||
|
// replace newlines with escaped newlines
|
||||||
|
logs = logs.replace(/\n/g, '\\n');
|
||||||
const response = await cloud_runner_system_1.CloudRunnerSystem.Run(`curl -X POST -d "${logs}" ${url}`, false, true);
|
const response = await cloud_runner_system_1.CloudRunnerSystem.Run(`curl -X POST -d "${logs}" ${url}`, false, true);
|
||||||
remote_client_logger_1.RemoteClientLogger.log(`Pushed logs to ${url} ${response}`);
|
remote_client_logger_1.RemoteClientLogger.log(`Pushed logs to ${url} ${response}`);
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -61,6 +61,9 @@ class Kubernetes implements ProviderInterface {
|
||||||
}
|
}
|
||||||
const url = `http://${ip}/api/log`;
|
const url = `http://${ip}/api/log`;
|
||||||
RemoteClientLogger.log(`Pushing logs to ${url}`);
|
RemoteClientLogger.log(`Pushing logs to ${url}`);
|
||||||
|
|
||||||
|
// replace newlines with escaped newlines
|
||||||
|
logs = logs.replace(/\n/g, '\\n');
|
||||||
const response = await CloudRunnerSystem.Run(`curl -X POST -d "${logs}" ${url}`, false, true);
|
const response = await CloudRunnerSystem.Run(`curl -X POST -d "${logs}" ${url}`, false, true);
|
||||||
RemoteClientLogger.log(`Pushed logs to ${url} ${response}`);
|
RemoteClientLogger.log(`Pushed logs to ${url} ${response}`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue