1
0
mirror of https://github.com/google/nomulus synced 2026-02-07 13:31:12 +00:00

Hex dump the ICANN report response content for debugging. (#770)

For example if the content is a byte array of "Hello", the Hex dump will
be "48656C6C6F".
This commit is contained in:
Lai Jiang
2020-08-18 10:23:28 -04:00
committed by GitHub
parent b44c7d2786
commit f9e3986a4a

View File

@@ -28,6 +28,7 @@ import com.google.api.client.http.HttpTransport;
import com.google.common.base.Ascii;
import com.google.common.base.Splitter;
import com.google.common.flogger.FluentLogger;
import com.google.common.io.BaseEncoding;
import com.google.common.io.ByteStreams;
import google.registry.config.RegistryConfig.Config;
import google.registry.keyring.api.KeyModule.Key;
@@ -93,8 +94,10 @@ public class IcannHttpReporter {
response.getContent().close();
}
logger.atInfo().log(
"Received response code %d with content %s",
response.getStatusCode(), new String(content, UTF_8));
"Received response code %d with content: %s\n\nResponse content in hex: %s",
response.getStatusCode(),
new String(content, UTF_8),
BaseEncoding.base16().encode(content));
XjcIirdeaResult result = parseResult(content);
if (result.getCode().getValue() != 1000) {
success = false;