Browse Source

LogClient log update

pull/2/head
qiaozhanwei 5 years ago
parent
commit
e0f7a1c31a
  1. 6
      escheduler-api/src/main/java/cn/escheduler/api/log/LogClient.java

6
escheduler-api/src/main/java/cn/escheduler/api/log/LogClient.java

@ -100,7 +100,7 @@ public class LogClient {
* @return * @return
*/ */
public String viewLog(String path) { public String viewLog(String path) {
logger.info("view queryLog path {}",path); logger.info("view log path {}",path);
PathParameter pathParameter = PathParameter.newBuilder().setPath(path).build(); PathParameter pathParameter = PathParameter.newBuilder().setPath(path).build();
RetStrInfo retStrInfo; RetStrInfo retStrInfo;
try { try {
@ -119,14 +119,14 @@ public class LogClient {
* @return * @return
*/ */
public byte[] getLogBytes(String path) { public byte[] getLogBytes(String path) {
logger.info("get log path {}",path); logger.info("log path {}",path);
PathParameter pathParameter = PathParameter.newBuilder().setPath(path).build(); PathParameter pathParameter = PathParameter.newBuilder().setPath(path).build();
RetByteInfo retByteInfo; RetByteInfo retByteInfo;
try { try {
retByteInfo = blockingStub.getLogBytes(pathParameter); retByteInfo = blockingStub.getLogBytes(pathParameter);
return retByteInfo.getData().toByteArray(); return retByteInfo.getData().toByteArray();
} catch (StatusRuntimeException e) { } catch (StatusRuntimeException e) {
logger.error("get log size error", e); logger.error("log size error", e);
return null; return null;
} }
} }

Loading…
Cancel
Save