|
|
@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|