mirror of
https://github.com/google/nomulus.git
synced 2025-07-21 10:16:07 +02: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:
parent
b44c7d2786
commit
f9e3986a4a
1 changed files with 5 additions and 2 deletions
|
@ -28,6 +28,7 @@ import com.google.api.client.http.HttpTransport;
|
||||||
import com.google.common.base.Ascii;
|
import com.google.common.base.Ascii;
|
||||||
import com.google.common.base.Splitter;
|
import com.google.common.base.Splitter;
|
||||||
import com.google.common.flogger.FluentLogger;
|
import com.google.common.flogger.FluentLogger;
|
||||||
|
import com.google.common.io.BaseEncoding;
|
||||||
import com.google.common.io.ByteStreams;
|
import com.google.common.io.ByteStreams;
|
||||||
import google.registry.config.RegistryConfig.Config;
|
import google.registry.config.RegistryConfig.Config;
|
||||||
import google.registry.keyring.api.KeyModule.Key;
|
import google.registry.keyring.api.KeyModule.Key;
|
||||||
|
@ -93,8 +94,10 @@ public class IcannHttpReporter {
|
||||||
response.getContent().close();
|
response.getContent().close();
|
||||||
}
|
}
|
||||||
logger.atInfo().log(
|
logger.atInfo().log(
|
||||||
"Received response code %d with content %s",
|
"Received response code %d with content: %s\n\nResponse content in hex: %s",
|
||||||
response.getStatusCode(), new String(content, UTF_8));
|
response.getStatusCode(),
|
||||||
|
new String(content, UTF_8),
|
||||||
|
BaseEncoding.base16().encode(content));
|
||||||
XjcIirdeaResult result = parseResult(content);
|
XjcIirdeaResult result = parseResult(content);
|
||||||
if (result.getCode().getValue() != 1000) {
|
if (result.getCode().getValue() != 1000) {
|
||||||
success = false;
|
success = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue