diff --git a/java/java-impl/src/com/intellij/ui/logging/JvmLoggingConfigurable.kt b/java/java-impl/src/com/intellij/ui/logging/JvmLoggingConfigurable.kt
index e25f0216d012..74ed2da7abb8 100644
--- a/java/java-impl/src/com/intellij/ui/logging/JvmLoggingConfigurable.kt
+++ b/java/java-impl/src/com/intellij/ui/logging/JvmLoggingConfigurable.kt
@@ -67,11 +67,14 @@ class JvmLoggingConfigurable(private val project: Project) : DslConfigurableBase
}
private fun ValidationInfoBuilder.checkLogName(it: JBTextField): ValidationInfo? =
- if (it.text.length < LOG_MAX_NAME_LENGTH && PsiNameHelper.getInstance(project).isIdentifier(it.text)) {
- null
+ if (!PsiNameHelper.getInstance(project).isIdentifier(it.text)) {
+ error(LangBundle.message("dialog.message.valid.identifier", it.text))
+ }
+ else if (it.text.length > LOG_MAX_NAME_LENGTH) {
+ error(JavaBundle.message("java.configurable.logger.identifier.long", it.text))
}
else {
- error(LangBundle.message("dialog.message.valid.identifier", it.text))
+ null
}
override fun isModified(): Boolean {
diff --git a/java/openapi/resources/messages/JavaBundle.properties b/java/openapi/resources/messages/JavaBundle.properties
index 0971863e6f5c..cf42c932bbfc 100644
--- a/java/openapi/resources/messages/JavaBundle.properties
+++ b/java/openapi/resources/messages/JavaBundle.properties
@@ -973,8 +973,9 @@ java.terms.of.interface={0} of interface {1}
java.terms.static.initializer=static initializer
java.terms.type.parameter=type parameter
java.terms.variable.of.method={0} of {1}
-java.configurable.logger.unspecified = Unspecified
-java.configurable.logger.not.found = Logger was not found inside the project
+java.configurable.logger.unspecified=Unspecified
+java.configurable.logger.not.found=Logger was not found inside the project
+java.configurable.logger.identifier.long=Identifier is too long
javadoc.candidates.not.found=No candidates found for method call {0}.
javadoc.constructor.candidates=Candidates for new {0}() are:
{1}
javadoc.deprecated=Deprecated