mirror of https://github.com/apache/jclouds.git
Emit sensitive property name instead of constant
This makes more sense to users of external utilities like jclouds-cli.
This commit is contained in:
parent
a8f5401f6c
commit
bcc06cc6ec
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
package org.jclouds.http;
|
||||
|
||||
import org.jclouds.Constants;
|
||||
import org.jclouds.io.Payload;
|
||||
import org.jclouds.io.payloads.StringPayload;
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
|
@ -93,7 +94,7 @@ public class HttpResponseException extends RuntimeException {
|
|||
try {
|
||||
String logStatement;
|
||||
if (payload.isSensitive() && !logSensitiveInformation) {
|
||||
logStatement = "Sensitive data in payload, use PROPERTY_LOGGER_WIRE_LOG_SENSITIVE_INFO override to enable logging this data.";
|
||||
logStatement = "Sensitive data in payload, use " + Constants.PROPERTY_LOGGER_WIRE_LOG_SENSITIVE_INFO + " override to enable logging this data.";
|
||||
} else if (payload instanceof StringPayload) {
|
||||
logStatement = payload.getRawContent().toString();
|
||||
} else {
|
||||
|
|
|
@ -18,6 +18,7 @@ package org.jclouds.logging.internal;
|
|||
|
||||
import com.google.common.io.ByteStreams;
|
||||
import com.google.common.io.FileBackedOutputStream;
|
||||
import org.jclouds.Constants;
|
||||
import org.jclouds.io.MutableContentMetadata;
|
||||
import org.jclouds.io.Payload;
|
||||
import org.jclouds.io.PayloadEnclosing;
|
||||
|
@ -147,7 +148,7 @@ public abstract class Wire {
|
|||
} catch (UnsupportedOperationException e) {
|
||||
wiredPayload = newPayload(oldContent.getInput());
|
||||
}
|
||||
output("Sensitive data in payload, use PROPERTY_LOGGER_WIRE_LOG_SENSITIVE_INFO override to enable logging this data.");
|
||||
output("Sensitive data in payload, use " + Constants.PROPERTY_LOGGER_WIRE_LOG_SENSITIVE_INFO + " override to enable logging this data.");
|
||||
}
|
||||
wiredPayload.setSensitive(oldContent.isSensitive());
|
||||
copyPayloadMetadata(oldContent, wiredPayload);
|
||||
|
|
Loading…
Reference in New Issue