Skip to content

Commit

Permalink
HSEARCH-1657 Improves logging for inconsistent
Browse files Browse the repository at this point in the history
field configuration by adding the class name to the log message.
  • Loading branch information
golovnin authored and Sanne committed Sep 10, 2014
1 parent 1617450 commit 40a6093
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -336,7 +336,9 @@ private Map<String, DocumentFieldMetadata> keyFieldMetadata(Set<PropertyMetadata
);
if ( oldFieldMetadata != null ) {
if ( !documentFieldMetadata.getIndex().equals( oldFieldMetadata.getIndex() ) ) {
log.inconsistentFieldConfiguration( documentFieldMetadata.getName() );
log.inconsistentFieldConfiguration(
propertyMetadata.getPropertyAccessor().getDeclaringClass().getName(),
documentFieldMetadata.getName() );
}
}
}
Expand Down
Expand Up @@ -525,8 +525,8 @@ public interface Log extends BasicLogger {
void optimizationSkippedStillBusy(String indexName);

@LogMessage(level = Level.WARN)
@Message(id = 120, value = "There are multiple properties indexed against the same field name '%1$s', but with different indexing settings. The behaviour is undefined.")
void inconsistentFieldConfiguration(String fieldName);
@Message(id = 120, value = "There are multiple properties indexed against the same field name '%1$s.%2$s', but with different indexing settings. The behaviour is undefined.")
void inconsistentFieldConfiguration(String className, String fieldName);

@Message(id = 121, value = "Unable to connect to: [%1$s] JGroups channel")
SearchException unableConnectingToJGroupsCluster(String clusterName, @Cause Throwable e);
Expand Down

0 comments on commit 40a6093

Please sign in to comment.