| 1 |
package org.jboss.resteasy.resteasy_jaxrs.i18n; |
| 2 |
|
| 3 |
import java.net.URL; |
| 4 |
|
| 5 |
import javax.ws.rs.core.MediaType; |
| 6 |
|
| 7 |
import org.jboss.logging.BasicLogger; |
| 8 |
import org.jboss.logging.Logger; |
| 9 |
import org.jboss.logging.Logger.Level; |
| 10 |
import org.jboss.logging.annotations.Cause; |
| 11 |
import org.jboss.logging.annotations.LogMessage; |
| 12 |
import org.jboss.logging.annotations.Message; |
| 13 |
import org.jboss.logging.annotations.Message.Format; |
| 14 |
import org.jboss.logging.annotations.MessageLogger; |
| 15 |
import org.jboss.resteasy.plugins.server.servlet.ResteasyContextParameters; |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
@MessageLogger(projectCode = "RESTEASY") |
| 25 |
public interface LogMessages extends BasicLogger |
| 26 |
{ |
| 27 |
LogMessages LOGGER = Logger.getMessageLogger(LogMessages.class, LogMessages.class.getPackage().getName()); |
| 28 |
int BASE = 2000; |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
@LogMessage(level = Level.ERROR) |
| 41 |
@Message(id = BASE + 0, value = "Error resuming failed async operation", format=Format.MESSAGE_FORMAT) |
| 42 |
void errorResumingFailedAsynchOperation(@Cause Throwable cause); |
| 43 |
|
| 44 |
@LogMessage(level = Level.ERROR) |
| 45 |
@Message(id = BASE + 5, value = "Failed executing {0} {1}", format=Format.MESSAGE_FORMAT) |
| 46 |
void failedExecutingError(String method, String path, @Cause Throwable cause); |
| 47 |
|
| 48 |
@LogMessage(level = Level.ERROR) |
| 49 |
@Message(id = BASE + 10, value = "Failed to execute") |
| 50 |
void failedToExecute(@Cause Throwable cause); |
| 51 |
|
| 52 |
@LogMessage(level = Level.ERROR) |
| 53 |
@Message(id = BASE + 15, value = "Failed to invoke asynchronously") |
| 54 |
void failedToInvokeAsynchronously(@Cause Throwable ignored); |
| 55 |
|
| 56 |
@LogMessage(level = Level.ERROR) |
| 57 |
@Message(id = BASE + 20, value = "Unhandled asynchronous exception, sending back 500", format=Format.MESSAGE_FORMAT) |
| 58 |
void unhandledAsynchronousException(@Cause Throwable ignored); |
| 59 |
|
| 60 |
@LogMessage(level = Level.ERROR) |
| 61 |
@Message(id = BASE + 25, value = "Unknown exception while executing {0} {1}", format=Format.MESSAGE_FORMAT) |
| 62 |
void unknownException(String method, String path, @Cause Throwable cause); |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
@LogMessage(level = Level.WARN) |
| 69 |
@Message(id = BASE + 100, value = "Accept extensions not supported.") |
| 70 |
void acceptExtensionsNotSupported(); |
| 71 |
|
| 72 |
@LogMessage(level = Level.WARN) |
| 73 |
@Message(id = BASE + 105, value = "Ambiguity constructors are found in %s. More details please refer to http://jsr311.java.net/nonav/releases/1.1/spec/spec.html") |
| 74 |
void ambiguousConstructorsFound(Class<?> clazz); |
| 75 |
|
| 76 |
@LogMessage(level = Level.WARN) |
| 77 |
@Message(id = BASE + 110, value = "Attempting to register empty contracts for %s") |
| 78 |
void attemptingToRegisterEmptyContracts(String className); |
| 79 |
|
| 80 |
@LogMessage(level = Level.WARN) |
| 81 |
@Message(id = BASE + 115, value = "Attempting to register unassignable contract for %s") |
| 82 |
void attemptingToRegisterUnassignableContract(String className); |
| 83 |
|
| 84 |
@LogMessage(level = Level.WARN) |
| 85 |
@Message(id = BASE + 120, value = "ClassNotFoundException: Unable to load builtin provider {0} from {1}", format=Format.MESSAGE_FORMAT) |
| 86 |
void classNotFoundException(String line, URL url, @Cause Throwable cause); |
| 87 |
|
| 88 |
@LogMessage(level = Level.WARN) |
| 89 |
@Message(id = BASE + 123, value = "Could not bind to specified download directory %s so will use temp dir.") |
| 90 |
void couldNotBindToDirectory(String directory); |
| 91 |
|
| 92 |
@LogMessage(level = Level.WARN) |
| 93 |
@Message(id = BASE + 125, value = "Marking file '%s' to be deleted, as it could not be deleted while processing request:") |
| 94 |
void couldNotDeleteFile(String path, @Cause Throwable cause); |
| 95 |
|
| 96 |
@LogMessage(level = Level.WARN) |
| 97 |
@Message(id = BASE + 130, value = "Failed to parse request.") |
| 98 |
void failedToParseRequest(@Cause Throwable cause); |
| 99 |
|
| 100 |
@LogMessage(level = Level.WARN) |
| 101 |
@Message(id = BASE + 135, value = "Ignoring unsupported locale: %s") |
| 102 |
void ignoringUnsupportedLocale(String locale); |
| 103 |
|
| 104 |
@LogMessage(level = Level.WARN) |
| 105 |
@Message(id = BASE + 137, value = "Invalid format for {0}, using default value {1}", format=Format.MESSAGE_FORMAT) |
| 106 |
void invalidFormat(String parameterName, String defaultValue); |
| 107 |
|
| 108 |
@LogMessage(level = Level.WARN) |
| 109 |
@Message(id = BASE + 140, value = "JAX-RS annotations found at non-public method: {0}.{1}(); Only public methods may be exposed as resource methods.", format=Format.MESSAGE_FORMAT) |
| 110 |
void JAXRSAnnotationsFoundAtNonPublicMethod(String className, String method); |
| 111 |
|
| 112 |
@LogMessage(level = Level.WARN) |
| 113 |
@Message(id = BASE + 142, value = "Multiple resource methods match request {0}. Selecting one. Matching methods: {1}", format=Format.MESSAGE_FORMAT) |
| 114 |
void multipleMethodsMatch(String request, String[] methods); |
| 115 |
|
| 116 |
@LogMessage(level = Level.WARN) |
| 117 |
@Message(id = BASE + 145, value = "NoClassDefFoundError: Unable to load builtin provider {0} from {1}", format=Format.MESSAGE_FORMAT) |
| 118 |
void noClassDefFoundErrorError(String line, URL url, @Cause Throwable cause); |
| 119 |
|
| 120 |
@LogMessage(level = Level.WARN) |
| 121 |
@Message(id = BASE + 150, value = "%s is no longer supported. Use a servlet 3.0 container and the ResteasyServletInitializer") |
| 122 |
void noLongerSupported(String param); |
| 123 |
|
| 124 |
@LogMessage(level = Level.WARN) |
| 125 |
@Message(id = BASE + 155, value = "Provider class {0} is already registered. 2nd registration is being ignored.", format=Format.MESSAGE_FORMAT) |
| 126 |
void providerClassAlreadyRegistered(String className); |
| 127 |
|
| 128 |
@LogMessage(level = Level.WARN) |
| 129 |
@Message(id = BASE + 160, value = "Provider instance {0} is already registered. 2nd registration is being ignored.", format=Format.MESSAGE_FORMAT) |
| 130 |
void providerInstanceAlreadyRegistered(String className); |
| 131 |
|
| 132 |
@LogMessage(level = Level.WARN) |
| 133 |
@Message(id = BASE + 165, value = "No valueOf() method available for %s, trying constructor...") |
| 134 |
void noValueOfMethodAvailable(String className); |
| 135 |
|
| 136 |
@LogMessage(level = Level.WARN) |
| 137 |
@Message(id = BASE + 170, value = "A reader for {0} was not found. This provider is currently configured to handle only {1}", format=Format.MESSAGE_FORMAT) |
| 138 |
void readerNotFound(MediaType mediaType, String[] availableTypes); |
| 139 |
|
| 140 |
@LogMessage(level = Level.WARN) |
| 141 |
@Message(id = BASE + 172, value = "Singleton {0} object class {1} already deployed. Singleton ignored.", format=Format.MESSAGE_FORMAT) |
| 142 |
void singletonClassAlreadyDeployed(String type, String className); |
| 143 |
|
| 144 |
@LogMessage(level = Level.WARN) |
| 145 |
@Message(id = BASE + 175, value = "The use of %s is deprecated, please use javax.ws.rs.Application as a context-param instead") |
| 146 |
void useOfApplicationClass(String className); |
| 147 |
|
| 148 |
@LogMessage(level = Level.WARN) |
| 149 |
@Message(id = BASE + 195, value = "The following sub-resource methods and sub-resource locators have the same path, [%s]. The paths should be unique. [%s]") |
| 150 |
void uriAmbiguity(String path, String methodList); |
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
@LogMessage(level = Level.INFO) |
| 157 |
@Message(id = BASE + 200, value = "Adding class resource {0} from Application {1}", format=Format.MESSAGE_FORMAT ) |
| 158 |
void addingClassResource(String className, Class<?> clazz); |
| 159 |
|
| 160 |
@LogMessage(level = Level.INFO) |
| 161 |
@Message(id = BASE + 205, value = "Adding provider class {0} from Application {1}", format=Format.MESSAGE_FORMAT ) |
| 162 |
void addingProviderClass(String className, Class<?> clazz); |
| 163 |
|
| 164 |
@LogMessage(level = Level.INFO) |
| 165 |
@Message(id = BASE + 210, value = "Adding provider singleton {0} from Application {1}", format=Format.MESSAGE_FORMAT) |
| 166 |
void addingProviderSingleton(String className, Class<?> application); |
| 167 |
|
| 168 |
@LogMessage(level = Level.INFO) |
| 169 |
@Message(id = BASE + 215, value = "Adding singleton provider {0} from Application {1}", format=Format.MESSAGE_FORMAT) |
| 170 |
void addingSingletonProvider(String className, Class<?> application); |
| 171 |
|
| 172 |
@LogMessage(level = Level.INFO) |
| 173 |
@Message(id = BASE + 220, value = "Adding singleton resource {0} from Application {1}", format=Format.MESSAGE_FORMAT) |
| 174 |
void addingSingletonResource(String className, Class<?> application); |
| 175 |
|
| 176 |
@LogMessage(level = Level.INFO) |
| 177 |
@Message(id = BASE + 225, value = "Deploying {0}: {1}", format=Format.MESSAGE_FORMAT) |
| 178 |
void deployingApplication(String className, Class<?> clazz); |
| 179 |
|
| 180 |
@LogMessage(level = Level.INFO) |
| 181 |
@Message(id = BASE + 227, value = "MediaType {0} on {1}() lacks charset. Consider setting charset or turning on context parameter " + ResteasyContextParameters.RESTEASY_ADD_CHARSET, format=Format.MESSAGE_FORMAT) |
| 182 |
void mediaTypeLacksCharset(MediaType mediaType, String method); |
| 183 |
|
| 184 |
@LogMessage(level = Level.INFO) |
| 185 |
@Message(id = BASE + 230, value = "Unable to close entity stream") |
| 186 |
void unableToCloseEntityStream(@Cause Throwable cause); |
| 187 |
|
| 188 |
@LogMessage(level = Level.INFO) |
| 189 |
@Message(id = BASE + 235, value = "Unable to decode GZIP compressed Base64 data") |
| 190 |
void unableToDecodeGZIPBase64(@Cause Throwable cause); |
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
@LogMessage(level = Level.DEBUG) |
| 198 |
@Message(id = BASE + 300, value = "Creating context object <{0} : {1}> ", format=Format.MESSAGE_FORMAT) |
| 199 |
void creatingContextObject(String key, String value); |
| 200 |
|
| 201 |
@LogMessage(level = Level.DEBUG) |
| 202 |
@Message(id = BASE + 305, value = "Failed executing {0} {1}", format=Format.MESSAGE_FORMAT) |
| 203 |
void failedExecutingDebug(String method, String path, @Cause Throwable cause); |
| 204 |
|
| 205 |
@LogMessage(level = Level.DEBUG) |
| 206 |
@Message(id = BASE + 307, value = "Failed to execute") |
| 207 |
void failedToExecuteDebug(@Cause Throwable cause); |
| 208 |
|
| 209 |
@LogMessage(level = Level.DEBUG) |
| 210 |
@Message(id = BASE + 310, value = "IN ONE WAY!!!!!") |
| 211 |
void inOneWay(); |
| 212 |
|
| 213 |
@LogMessage(level = Level.DEBUG) |
| 214 |
@Message(id = BASE + 315, value = "PathInfo: %s") |
| 215 |
void pathInfo(String path); |
| 216 |
|
| 217 |
@LogMessage(level = Level.DEBUG) |
| 218 |
@Message(id = BASE + 320, value = "RUNNING JOB!!!!") |
| 219 |
void runningJob(); |
| 220 |
|
| 221 |
@LogMessage(level = Level.DEBUG) |
| 222 |
@Message(id = BASE + 322, value = "Temporary file %s has been created. Consider deleting after it has been used.") |
| 223 |
void temporaryFileCreated(String fileName); |
| 224 |
|
| 225 |
@LogMessage(level = Level.DEBUG) |
| 226 |
@Message(id = BASE + 325, value = "Unable to retrieve config: disableDTDs defaults to true") |
| 227 |
void unableToRetrieveConfigDTDs(); |
| 228 |
|
| 229 |
@LogMessage(level = Level.DEBUG) |
| 230 |
@Message(id = BASE + 330, value = "Unable to retrieve config: expandEntityReferences defaults to false") |
| 231 |
void unableToRetrieveConfigExpand(); |
| 232 |
|
| 233 |
@LogMessage(level = Level.DEBUG) |
| 234 |
@Message(id = BASE + 335, value = "Unable to retrieve config: enableSecureProcessingFeature defaults to true") |
| 235 |
void unableToRetrieveConfigSecure(); |
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
} |