|
5 | 5 | package org.hibernate.search.backend.elasticsearch.client.common.logging.spi;
|
6 | 6 |
|
7 | 7 | import static org.hibernate.search.backend.elasticsearch.client.common.logging.spi.ElasticsearchClientCommonLog.ID_BACKEND_OFFSET;
|
| 8 | +import static org.hibernate.search.backend.elasticsearch.client.common.logging.spi.ElasticsearchClientCommonLog.ID_OFFSET; |
8 | 9 | import static org.hibernate.search.backend.elasticsearch.client.common.logging.spi.ElasticsearchClientCommonLog.ID_OFFSET_LEGACY_ES;
|
9 |
| -import static org.jboss.logging.Logger.Level.DEBUG; |
10 | 10 |
|
11 | 11 | import java.lang.invoke.MethodHandles;
|
12 | 12 | import java.util.List;
|
13 |
| -import java.util.Set; |
14 | 13 |
|
15 |
| -import org.hibernate.search.engine.environment.bean.BeanHolder; |
16 | 14 | import org.hibernate.search.util.common.SearchException;
|
17 | 15 | import org.hibernate.search.util.common.logging.CategorizedLogger;
|
18 | 16 | import org.hibernate.search.util.common.logging.impl.LoggerFactory;
|
19 | 17 | import org.hibernate.search.util.common.logging.impl.MessageConstants;
|
20 |
| -import org.hibernate.search.util.common.reporting.EventContext; |
21 | 18 |
|
22 | 19 | import org.jboss.logging.Logger;
|
23 | 20 | import org.jboss.logging.annotations.Cause;
|
24 | 21 | import org.jboss.logging.annotations.LogMessage;
|
25 | 22 | import org.jboss.logging.annotations.Message;
|
26 | 23 | import org.jboss.logging.annotations.MessageLogger;
|
27 |
| -import org.jboss.logging.annotations.Param; |
28 | 24 |
|
29 | 25 | @CategorizedLogger(
|
30 | 26 | category = ElasticsearchClientConfigurationLog.CATEGORY_NAME,
|
@@ -57,37 +53,12 @@ public interface ElasticsearchClientConfigurationLog {
|
57 | 53 | // -----------------------------------
|
58 | 54 | // New messages from Search 6 onwards
|
59 | 55 | // -----------------------------------
|
60 |
| - @Message(id = ID_BACKEND_OFFSET + 15, value = "Invalid multi-tenancy strategy name: '%1$s'." |
61 |
| - + " Valid names are: %2$s.") |
62 |
| - SearchException invalidMultiTenancyStrategyName(String invalidRepresentation, List<String> validRepresentations); |
63 |
| - |
64 |
| - @Message(id = ID_BACKEND_OFFSET + 16, |
65 |
| - value = "Invalid tenant identifiers: '%1$s'." |
66 |
| - + " No tenant identifier is expected, because multi-tenancy is disabled for this backend.") |
67 |
| - SearchException tenantIdProvidedButMultiTenancyDisabled(Set<String> tenantIds, @Param EventContext context); |
68 |
| - |
69 |
| - @Message(id = ID_BACKEND_OFFSET + 17, |
70 |
| - value = "Missing tenant identifier." |
71 |
| - + " A tenant identifier is expected, because multi-tenancy is enabled for this backend.") |
72 |
| - SearchException multiTenancyEnabledButNoTenantIdProvided(@Param EventContext context); |
73 |
| - |
74 |
| - @Message(id = ID_BACKEND_OFFSET + 58, value = "Invalid Elasticsearch distribution name: '%1$s'." |
75 |
| - + " Valid names are: %2$s.") |
76 |
| - SearchException invalidElasticsearchDistributionName(String invalidRepresentation, List<String> validRepresentations); |
77 | 56 |
|
78 | 57 | @Message(id = ID_BACKEND_OFFSET + 89, value = "Invalid host/port: '%1$s'."
|
79 | 58 | + " The host/port string must use the format 'host:port', for example 'mycompany.com:9200'"
|
80 | 59 | + " The URI scheme ('http://', 'https://') must not be included.")
|
81 | 60 | SearchException invalidHostAndPort(String hostAndPort, @Cause Exception e);
|
82 | 61 |
|
83 |
| - @Message(id = ID_BACKEND_OFFSET + 91, value = "Invalid name for the type-name mapping strategy: '%1$s'." |
84 |
| - + " Valid names are: %2$s.") |
85 |
| - SearchException invalidTypeNameMappingStrategyName(String invalidRepresentation, List<String> validRepresentations); |
86 |
| - |
87 |
| - @Message(id = ID_BACKEND_OFFSET + 121, value = "Invalid dynamic type: '%1$s'." |
88 |
| - + " Valid values are: %2$s.") |
89 |
| - SearchException invalidDynamicType(String invalidRepresentation, List<String> validRepresentations); |
90 |
| - |
91 | 62 | @Message(id = ID_BACKEND_OFFSET + 126, value = "Invalid target hosts configuration:"
|
92 | 63 | + " both the 'uris' property and the 'protocol' property are set."
|
93 | 64 | + " Uris: '%1$s'. Protocol: '%2$s'."
|
@@ -115,18 +86,11 @@ public interface ElasticsearchClientConfigurationLog {
|
115 | 86 | value = "Invalid target hosts configuration: the list of URIs must not be empty.")
|
116 | 87 | SearchException emptyListOfUris();
|
117 | 88 |
|
118 |
| - @Message(id = ID_BACKEND_OFFSET + 148, |
119 |
| - value = "Invalid backend configuration: mapping requires multi-tenancy" |
120 |
| - + " but no multi-tenancy strategy is set.") |
121 |
| - SearchException multiTenancyRequiredButExplicitlyDisabledByBackend(); |
| 89 | + // ----------------------------------- |
| 90 | + // New messages from Search 8.2 onwards |
| 91 | + // ----------------------------------- |
122 | 92 |
|
123 |
| - @Message(id = ID_BACKEND_OFFSET + 149, |
124 |
| - value = "Invalid backend configuration: mapping requires single-tenancy" |
125 |
| - + " but multi-tenancy strategy is set.") |
126 |
| - SearchException multiTenancyNotRequiredButExplicitlyEnabledByTheBackend(); |
| 93 | + @Message(id = ID_OFFSET + 1, value = "Invalid uri: '%1$s'. Reason: %2$s") |
| 94 | + SearchException invalidUri(String uri, String reason, @Cause Exception e); |
127 | 95 |
|
128 |
| - @LogMessage(level = DEBUG) |
129 |
| - @Message(id = ID_BACKEND_OFFSET + 192, |
130 |
| - value = "Elasticsearch backend will use client factory '%s'. Context: %s") |
131 |
| - void backendClientFactory(BeanHolder<?> clientFactoryHolder, String eventContext); |
132 | 96 | }
|
0 commit comments