Improve RDE error logging

RDE logs somewhat inscrutable errors when XML validation of the output fails due to bad data in Datastore. This CL adds a little more information to help us track down this sort of problem in the future.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140872462
This commit is contained in:
mountford 2016-12-02 11:21:24 -08:00 committed by Ben McIlwain
parent f227598920
commit da711343f0
2 changed files with 2 additions and 2 deletions

View file

@ -148,7 +148,7 @@ public final class RdeMarshaller implements Serializable {
Key.create(resource), Key.create(resource),
e.getLinkedException(), e.getLinkedException(),
getMarshaller().marshalLenient(element)); getMarshaller().marshalLenient(element));
logger.severe(error); logger.severe(e, error);
} }
return DepositFragment.create(type, xml, error); return DepositFragment.create(type, xml, error);
} }

View file

@ -162,7 +162,7 @@ public final class RdeStagingReducer extends Reducer<PendingDeposit, DepositFrag
} }
// If an entity was broken, abort after writing as much logs/deposit data as possible. // If an entity was broken, abort after writing as much logs/deposit data as possible.
verify(!failed); verify(!failed, "RDE staging failed for TLD %s", tld);
// Write a file to GCS containing the byte length (ASCII) of the raw unencrypted XML. // Write a file to GCS containing the byte length (ASCII) of the raw unencrypted XML.
// //