Log: Print stack trace on exception Change-Id: I45b0886fe25da73c09aff4f4910f6826081ae4f7
diff --git a/src/main/java/com/googlesource/gerrit/plugins/importer/ImportLog.java b/src/main/java/com/googlesource/gerrit/plugins/importer/ImportLog.java index 38e0f8b..8c6f27e 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/importer/ImportLog.java +++ b/src/main/java/com/googlesource/gerrit/plugins/importer/ImportLog.java
@@ -14,6 +14,7 @@ package com.googlesource.gerrit.plugins.importer; +import com.google.common.base.Throwables; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import com.google.gerrit.audit.AuditEvent; @@ -96,7 +97,7 @@ event.setProperty(TARGET_PROJECT_NAME, targetProject.get()); if (ex != null) { - event.setProperty(ERROR, ex.toString()); + event.setProperty(ERROR, Throwables.getStackTraceAsString(ex)); } log.callAppenders(event);