GeneralConfig: Include parameter name into warning
When an invalid value for the code owner config validation policy was
configured in code-owners.config the warning didn't say for which
parameter the invalid value was found.
Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: Iffd1de5db98bbae337a407e30ea9ab5ee655c948
diff --git a/java/com/google/gerrit/plugins/codeowners/backend/config/GeneralConfig.java b/java/com/google/gerrit/plugins/codeowners/backend/config/GeneralConfig.java
index f1505c0..3558582 100644
--- a/java/com/google/gerrit/plugins/codeowners/backend/config/GeneralConfig.java
+++ b/java/com/google/gerrit/plugins/codeowners/backend/config/GeneralConfig.java
@@ -436,8 +436,12 @@
} catch (IllegalArgumentException e) {
logger.atWarning().withCause(e).log(
"Ignoring invalid value %s for the code owner config validation policy in '%s.config'"
- + " of project %s. Falling back to global config.",
- codeOwnerConfigValidationPolicyString, pluginName, project.get());
+ + " of project %s (parameter %s.%s). Falling back to global config.",
+ codeOwnerConfigValidationPolicyString,
+ pluginName,
+ project.get(),
+ SECTION_CODE_OWNERS,
+ key);
}
}