diff --git a/build-parent/pom.xml b/build-parent/pom.xml index b2c5852381b8d..fc74545e37c57 100644 --- a/build-parent/pom.xml +++ b/build-parent/pom.xml @@ -102,7 +102,7 @@ 2.0 1.7.25 1.1.0.Final - 1.5.0.Alpha3-format-001 + 1.5.0.Alpha4-format-002 1.0.0.Final 1.8.0.Alpha1 @@ -127,6 +127,7 @@ 4.1.30.Final 1.0.2 1.10.6 + 3.3.2.Final @@ -155,12 +156,6 @@ org.jboss.shamrock shamrock-builder ${project.version} - - - org.jboss.logging - jboss-logging - - org.jboss.shamrock @@ -528,8 +523,8 @@ org.jboss.logging - jboss-logging-embedded - ${project.version} + jboss-logging + ${jboss-logging.version} org.jboss.logmanager @@ -700,10 +695,6 @@ undertow-servlet ${undertow.version} - - org.jboss.logging - jboss-logging - org.jboss.spec.javax.annotation jboss-annotations-api_1.2_spec @@ -715,10 +706,6 @@ undertow-websockets-jsr ${undertow.version} - - org.jboss.logging - jboss-logging - org.jboss.spec.javax.annotation jboss-annotations-api_1.2_spec @@ -730,10 +717,6 @@ smallrye-config ${smallrye-config.version} - - org.jboss.logging - jboss-logging - @@ -746,10 +729,6 @@ smallrye-metrics ${smallrye-metrics.version} - - org.jboss.logging - jboss-logging - javax javaee-api @@ -761,10 +740,6 @@ smallrye-open-api ${smallrye-open-api.version} - - org.jboss.logging - jboss-logging - javax javaee-api @@ -776,10 +751,6 @@ smallrye-opentracing ${smallrye-opentracing.version} - - org.jboss.logging - jboss-logging - javax javaee-api @@ -790,12 +761,6 @@ io.smallrye smallrye-fault-tolerance ${smallrye-fault-tolerance.version} - - - org.jboss.logging - jboss-logging - - javax.activation @@ -1036,12 +1001,6 @@ org.jboss.metadata jboss-metadata-web ${jboss-metadata-web.version} - - - org.jboss.logging - jboss-logging - - @@ -1068,22 +1027,12 @@ org.jboss.resteasy resteasy-client ${resteasy.version} - - - org.jboss.logging - jboss-logging - - org.jboss.resteasy resteasy-core ${resteasy.version} - - org.jboss.logging - jboss-logging - org.jboss.spec.javax.annotation jboss-annotations-api_1.3_spec @@ -1099,10 +1048,6 @@ resteasy-core-spi ${resteasy.version} - - org.jboss.logging - jboss-logging - org.jboss.spec.javax.annotation jboss-annotations-api_1.3_spec @@ -1117,33 +1062,17 @@ org.jboss.resteasy resteasy-json-binding-provider ${resteasy.version} - - - org.jboss.logging - jboss-logging - - org.jboss.resteasy resteasy-json-p-provider ${resteasy.version} - - - org.jboss.logging - jboss-logging - - org.jboss.resteasy resteasy-jaxb-provider ${resteasy.version} - - org.jboss.logging - jboss-logging - javax.xml.bind @@ -1155,12 +1084,6 @@ org.jboss.resteasy resteasy-rxjava2 ${resteasy.version} - - - org.jboss.logging - jboss-logging - - @@ -1189,12 +1112,6 @@ org.jboss.threads jboss-threads ${jboss-threads.version} - - - org.jboss.logging - jboss-logging - - org.jboss @@ -1205,12 +1122,6 @@ org.jboss.protean.arc arc-processor ${project.version} - - - org.jboss.logging - jboss-logging - - org.jboss.protean.arc @@ -1260,23 +1171,11 @@ org.wildfly.client wildfly-client-config ${wildfly-client-config.version} - - - org.jboss.logging - jboss-logging - - org.wildfly.security wildfly-elytron-embedded ${wildfly-elytron.version} - - - org.jboss.logging - jboss-logging - - @@ -1303,12 +1202,6 @@ org.jboss.slf4j slf4j-jboss-logging ${slf4j-jboss-logging.version} - - - org.jboss.logging - jboss-logging - - javax.enterprise @@ -1319,12 +1212,6 @@ org.hibernate.validator hibernate-validator ${hibernate-validator.version} - - - org.jboss.logging - jboss-logging - - org.hibernate @@ -1341,10 +1228,6 @@ com.sun.xml.bind jaxb-impl - - org.jboss.logging - jboss-logging - @@ -1449,8 +1332,6 @@ org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec org.jboss.spec.javax.annotation:jboss-annotations-api_1.3_spec - - org.jboss.logging:jboss-logging org.jboss.logging:jboss-logmanager diff --git a/core/builder/pom.xml b/core/builder/pom.xml index f82824e7b304a..2f3008b0bf282 100644 --- a/core/builder/pom.xml +++ b/core/builder/pom.xml @@ -43,7 +43,7 @@ org.jboss.logging - jboss-logging-embedded + jboss-logging org.jboss.threads diff --git a/core/runtime/pom.xml b/core/runtime/pom.xml index 816f4352979c9..22accb1a0a5f3 100644 --- a/core/runtime/pom.xml +++ b/core/runtime/pom.xml @@ -45,7 +45,7 @@ org.jboss.logging - jboss-logging-embedded + jboss-logging org.jboss.logmanager diff --git a/extensions/arc/runtime/pom.xml b/extensions/arc/runtime/pom.xml index 95ab5e78935b2..fc5d90e25f001 100644 --- a/extensions/arc/runtime/pom.xml +++ b/extensions/arc/runtime/pom.xml @@ -33,12 +33,6 @@ org.jboss.protean.arc arc-runtime - - - org.jboss.logging - jboss-logging - - org.jboss.shamrock diff --git a/extensions/infinispan-client/runtime/pom.xml b/extensions/infinispan-client/runtime/pom.xml index c6672e6a6cd48..1f8be910ef405 100644 --- a/extensions/infinispan-client/runtime/pom.xml +++ b/extensions/infinispan-client/runtime/pom.xml @@ -53,10 +53,6 @@ org.jboss.marshalling jboss-marshalling-osgi - - org.jboss.logging - jboss-logging - @@ -64,12 +60,6 @@ org.infinispan infinispan-remote-query-client true - - - org.jboss.logging - jboss-logging - - diff --git a/independent-projects/infinispan-hibernate-cache-protean/pom.xml b/independent-projects/infinispan-hibernate-cache-protean/pom.xml index 5bd42e2423eec..6429542ec3ccd 100644 --- a/independent-projects/infinispan-hibernate-cache-protean/pom.xml +++ b/independent-projects/infinispan-hibernate-cache-protean/pom.xml @@ -31,7 +31,7 @@ 2.6.2 5.4.1.Final - 1.0.0.Alpha1-SNAPSHOT + 3.3.2.Final @@ -47,7 +47,7 @@ org.jboss.logging - jboss-logging-embedded + jboss-logging ${version.jboss-logging} diff --git a/independent-projects/jboss-logging-embedded/pom.xml b/independent-projects/jboss-logging-embedded/pom.xml deleted file mode 100644 index 148652df0ba5a..0000000000000 --- a/independent-projects/jboss-logging-embedded/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - 4.0.0 - - - org.jboss.shamrock - shamrock-build-parent - 1.0.0.Alpha1-SNAPSHOT - ../../build-parent/pom.xml - - - org.jboss.logging - jboss-logging-embedded - Shamrock - JBoss Logging (embedded version) - - jar - - - - - log4j - log4j - - - * - * - - - provided - - - - org.apache.logging.log4j - log4j-api - provided - - - - org.jboss.logmanager - jboss-logmanager-embedded - provided - - - - org.slf4j - slf4j-api - provided - - - - com.oracle.substratevm - svm - - - diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/AbstractLoggerProvider.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/AbstractLoggerProvider.java deleted file mode 100644 index 6a006eb99b9e3..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/AbstractLoggerProvider.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.util.ArrayDeque; - -abstract class AbstractLoggerProvider { - - private final ThreadLocal> ndcStack = new ThreadLocal>(); - - public void clearNdc() { - ArrayDeque stack = ndcStack.get(); - if (stack != null) - stack.clear(); - } - - public String getNdc() { - ArrayDeque stack = ndcStack.get(); - return stack == null || stack.isEmpty() ? null : stack.peek().merged; - } - - public int getNdcDepth() { - ArrayDeque stack = ndcStack.get(); - return stack == null ? 0 : stack.size(); - } - - public String peekNdc() { - ArrayDeque stack = ndcStack.get(); - return stack == null || stack.isEmpty() ? "" : stack.peek().current; - } - - public String popNdc() { - ArrayDeque stack = ndcStack.get(); - return stack == null || stack.isEmpty() ? "" : stack.pop().current; - } - - public void pushNdc(String message) { - ArrayDeque stack = ndcStack.get(); - if (stack == null) { - stack = new ArrayDeque(); - ndcStack.set(stack); - } - stack.push(stack.isEmpty() ? new Entry(message) : new Entry(stack.peek(), message)); - } - - public void setNdcMaxDepth(int maxDepth) { - final ArrayDeque stack = ndcStack.get(); - if (stack != null) while (stack.size() > maxDepth) stack.pop(); - } - - private static class Entry { - - private String merged; - private String current; - - Entry(String current) { - merged = current; - this.current = current; - } - - Entry(Entry parent, String current) { - merged = parent.merged + ' ' + current; - this.current = current; - } - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/AbstractMdcLoggerProvider.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/AbstractMdcLoggerProvider.java deleted file mode 100644 index 626cfb685b7a8..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/AbstractMdcLoggerProvider.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -abstract class AbstractMdcLoggerProvider extends AbstractLoggerProvider { - - private final ThreadLocal> mdcMap = new ThreadLocal>(); - - public void clearMdc() { - final Map map = mdcMap.get(); - if (map != null) { - map.clear(); - } - } - - public Object getMdc(String key) { - return mdcMap.get() == null ? null : mdcMap.get().get(key); - } - - public Map getMdcMap() { - final Map map = mdcMap.get(); - return map == null ? Collections.emptyMap() : map; - } - - public Object putMdc(String key, Object value) { - Map map = mdcMap.get(); - if (map == null) { - map = new HashMap(); - mdcMap.set(map); - } - return map.put(key, value); - } - - public void removeMdc(String key) { - Map map = mdcMap.get(); - if (map == null) - return; - map.remove(key); - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/BasicLogger.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/BasicLogger.java deleted file mode 100644 index c90a679d8d37f..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/BasicLogger.java +++ /dev/null @@ -1,1915 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -/** - * An interface which specifies the basic logger methods. When used as the base interface of a typed logger, these methods will delegate - * to the corresponding underlying logger instance. - * - * @author David M. Lloyd - */ -public interface BasicLogger { - - /** - * Check to see if the given level is enabled for this logger. - * - * @param level the level to check for - * @return {@code true} if messages may be logged at the given level, {@code false} otherwise - */ - boolean isEnabled(Logger.Level level); - - /** - * Check to see if the {@code TRACE} level is enabled for this logger. - * - * @return {@code true} if messages logged at {@link org.jboss.logging.Logger.Level#TRACE} may be accepted, {@code false} otherwise - */ - boolean isTraceEnabled(); - - /** - * Issue a log message with a level of TRACE. - * - * @param message the message - */ - void trace(Object message); - - /** - * Issue a log message and throwable with a level of TRACE. - * - * @param message the message - * @param t the throwable - */ - void trace(Object message, Throwable t); - - /** - * Issue a log message and throwable with a level of TRACE and a specific logger class name. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - void trace(String loggerFqcn, Object message, Throwable t); - - /** - * Issue a log message with parameters and a throwable with a level of TRACE. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - void trace(String loggerFqcn, Object message, Object[] params, Throwable t); - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param params the parameters - */ - void tracev(String format, Object... params); - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the sole parameter - */ - void tracev(String format, Object param1); - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void tracev(String format, Object param1, Object param2); - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void tracev(String format, Object param1, Object param2, Object param3); - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - void tracev(Throwable t, String format, Object... params); - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - void tracev(Throwable t, String format, Object param1); - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void tracev(Throwable t, String format, Object param1, Object param2); - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void tracev(Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - void tracef(String format, Object... params); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - void tracef(String format, Object param1); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - void tracef(String format, Object param1, Object param2); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void tracef(String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - void tracef(Throwable t, String format, Object... params); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - void tracef(Throwable t, String format, Object param1); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - void tracef(Throwable t, String format, Object param1, Object param2); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void tracef(Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg the parameter - */ - void tracef(String format, int arg); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void tracef(String format, int arg1, int arg2); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void tracef(String format, int arg1, Object arg2); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void tracef(String format, int arg1, int arg2, int arg3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void tracef(String format, int arg1, int arg2, Object arg3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void tracef(String format, int arg1, Object arg2, Object arg3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg the parameter - */ - void tracef(Throwable t, String format, int arg); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void tracef(Throwable t, String format, int arg1, int arg2); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void tracef(Throwable t, String format, int arg1, Object arg2); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void tracef(Throwable t, String format, int arg1, int arg2, int arg3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void tracef(Throwable t, String format, int arg1, int arg2, Object arg3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void tracef(Throwable t, String format, int arg1, Object arg2, Object arg3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg the parameter - */ - void tracef(String format, long arg); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void tracef(String format, long arg1, long arg2); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void tracef(String format, long arg1, Object arg2); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void tracef(String format, long arg1, long arg2, long arg3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void tracef(String format, long arg1, long arg2, Object arg3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void tracef(String format, long arg1, Object arg2, Object arg3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg the parameter - */ - void tracef(Throwable t, String format, long arg); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void tracef(Throwable t, String format, long arg1, long arg2); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void tracef(Throwable t, String format, long arg1, Object arg2); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void tracef(Throwable t, String format, long arg1, long arg2, long arg3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void tracef(Throwable t, String format, long arg1, long arg2, Object arg3); - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void tracef(Throwable t, String format, long arg1, Object arg2, Object arg3); - - /** - * Check to see if the {@code DEBUG} level is enabled for this logger. - * - * @return {@code true} if messages logged at {@link org.jboss.logging.Logger.Level#DEBUG} may be accepted, {@code false} otherwise - */ - boolean isDebugEnabled(); - - /** - * Issue a log message with a level of DEBUG. - * - * @param message the message - */ - void debug(Object message); - - /** - * Issue a log message and throwable with a level of DEBUG. - * - * @param message the message - * @param t the throwable - */ - void debug(Object message, Throwable t); - - /** - * Issue a log message and throwable with a level of DEBUG and a specific logger class name. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - void debug(String loggerFqcn, Object message, Throwable t); - - /** - * Issue a log message with parameters and a throwable with a level of DEBUG. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - void debug(String loggerFqcn, Object message, Object[] params, Throwable t); - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param params the parameters - */ - void debugv(String format, Object... params); - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the sole parameter - */ - void debugv(String format, Object param1); - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void debugv(String format, Object param1, Object param2); - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void debugv(String format, Object param1, Object param2, Object param3); - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - void debugv(Throwable t, String format, Object... params); - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - void debugv(Throwable t, String format, Object param1); - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void debugv(Throwable t, String format, Object param1, Object param2); - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void debugv(Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - void debugf(String format, Object... params); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - void debugf(String format, Object param1); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - void debugf(String format, Object param1, Object param2); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void debugf(String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - void debugf(Throwable t, String format, Object... params); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - void debugf(Throwable t, String format, Object param1); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - void debugf(Throwable t, String format, Object param1, Object param2); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void debugf(Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg the parameter - */ - void debugf(String format, int arg); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void debugf(String format, int arg1, int arg2); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void debugf(String format, int arg1, Object arg2); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void debugf(String format, int arg1, int arg2, int arg3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void debugf(String format, int arg1, int arg2, Object arg3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void debugf(String format, int arg1, Object arg2, Object arg3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg the parameter - */ - void debugf(Throwable t, String format, int arg); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void debugf(Throwable t, String format, int arg1, int arg2); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void debugf(Throwable t, String format, int arg1, Object arg2); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void debugf(Throwable t, String format, int arg1, int arg2, int arg3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void debugf(Throwable t, String format, int arg1, int arg2, Object arg3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void debugf(Throwable t, String format, int arg1, Object arg2, Object arg3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg the parameter - */ - void debugf(String format, long arg); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void debugf(String format, long arg1, long arg2); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void debugf(String format, long arg1, Object arg2); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void debugf(String format, long arg1, long arg2, long arg3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void debugf(String format, long arg1, long arg2, Object arg3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void debugf(String format, long arg1, Object arg2, Object arg3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg the parameter - */ - void debugf(Throwable t, String format, long arg); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void debugf(Throwable t, String format, long arg1, long arg2); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - */ - void debugf(Throwable t, String format, long arg1, Object arg2); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void debugf(Throwable t, String format, long arg1, long arg2, long arg3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void debugf(Throwable t, String format, long arg1, long arg2, Object arg3); - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param arg1 the first parameter - * @param arg2 the second parameter - * @param arg3 the third parameter - */ - void debugf(Throwable t, String format, long arg1, Object arg2, Object arg3); - - /** - * Check to see if the {@code INFO} level is enabled for this logger. - * - * @return {@code true} if messages logged at {@link org.jboss.logging.Logger.Level#INFO} may be accepted, {@code false} otherwise - */ - boolean isInfoEnabled(); - - /** - * Issue a log message with a level of INFO. - * - * @param message the message - */ - void info(Object message); - - /** - * Issue a log message and throwable with a level of INFO. - * - * @param message the message - * @param t the throwable - */ - void info(Object message, Throwable t); - - /** - * Issue a log message and throwable with a level of INFO and a specific logger class name. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - void info(String loggerFqcn, Object message, Throwable t); - - /** - * Issue a log message with parameters and a throwable with a level of INFO. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - void info(String loggerFqcn, Object message, Object[] params, Throwable t); - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param params the parameters - */ - void infov(String format, Object... params); - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the sole parameter - */ - void infov(String format, Object param1); - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void infov(String format, Object param1, Object param2); - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void infov(String format, Object param1, Object param2, Object param3); - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - void infov(Throwable t, String format, Object... params); - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - void infov(Throwable t, String format, Object param1); - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void infov(Throwable t, String format, Object param1, Object param2); - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void infov(Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of INFO. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - void infof(String format, Object... params); - - /** - * Issue a formatted log message with a level of INFO. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - void infof(String format, Object param1); - - /** - * Issue a formatted log message with a level of INFO. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - void infof(String format, Object param1, Object param2); - - /** - * Issue a formatted log message with a level of INFO. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void infof(String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of INFO. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - void infof(Throwable t, String format, Object... params); - - /** - * Issue a formatted log message with a level of INFO. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - void infof(Throwable t, String format, Object param1); - - /** - * Issue a formatted log message with a level of INFO. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - void infof(Throwable t, String format, Object param1, Object param2); - - /** - * Issue a formatted log message with a level of INFO. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void infof(Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Issue a log message with a level of WARN. - * - * @param message the message - */ - void warn(Object message); - - /** - * Issue a log message and throwable with a level of WARN. - * - * @param message the message - * @param t the throwable - */ - void warn(Object message, Throwable t); - - /** - * Issue a log message and throwable with a level of WARN and a specific logger class name. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - void warn(String loggerFqcn, Object message, Throwable t); - - /** - * Issue a log message with parameters and a throwable with a level of WARN. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - void warn(String loggerFqcn, Object message, Object[] params, Throwable t); - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param params the parameters - */ - void warnv(String format, Object... params); - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the sole parameter - */ - void warnv(String format, Object param1); - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void warnv(String format, Object param1, Object param2); - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void warnv(String format, Object param1, Object param2, Object param3); - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - void warnv(Throwable t, String format, Object... params); - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - void warnv(Throwable t, String format, Object param1); - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void warnv(Throwable t, String format, Object param1, Object param2); - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void warnv(Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of WARN. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - void warnf(String format, Object... params); - - /** - * Issue a formatted log message with a level of WARN. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - void warnf(String format, Object param1); - - /** - * Issue a formatted log message with a level of WARN. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - void warnf(String format, Object param1, Object param2); - - /** - * Issue a formatted log message with a level of WARN. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void warnf(String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of WARN. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - void warnf(Throwable t, String format, Object... params); - - /** - * Issue a formatted log message with a level of WARN. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - void warnf(Throwable t, String format, Object param1); - - /** - * Issue a formatted log message with a level of WARN. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - void warnf(Throwable t, String format, Object param1, Object param2); - - /** - * Issue a formatted log message with a level of WARN. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void warnf(Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Issue a log message with a level of ERROR. - * - * @param message the message - */ - void error(Object message); - - /** - * Issue a log message and throwable with a level of ERROR. - * - * @param message the message - * @param t the throwable - */ - void error(Object message, Throwable t); - - /** - * Issue a log message and throwable with a level of ERROR and a specific logger class name. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - void error(String loggerFqcn, Object message, Throwable t); - - /** - * Issue a log message with parameters and a throwable with a level of ERROR. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - void error(String loggerFqcn, Object message, Object[] params, Throwable t); - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param params the parameters - */ - void errorv(String format, Object... params); - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the sole parameter - */ - void errorv(String format, Object param1); - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void errorv(String format, Object param1, Object param2); - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void errorv(String format, Object param1, Object param2, Object param3); - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - void errorv(Throwable t, String format, Object... params); - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - void errorv(Throwable t, String format, Object param1); - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void errorv(Throwable t, String format, Object param1, Object param2); - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void errorv(Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - void errorf(String format, Object... params); - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - void errorf(String format, Object param1); - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - void errorf(String format, Object param1, Object param2); - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void errorf(String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - void errorf(Throwable t, String format, Object... params); - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - void errorf(Throwable t, String format, Object param1); - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - void errorf(Throwable t, String format, Object param1, Object param2); - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void errorf(Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Issue a log message with a level of FATAL. - * - * @param message the message - */ - void fatal(Object message); - - /** - * Issue a log message and throwable with a level of FATAL. - * - * @param message the message - * @param t the throwable - */ - void fatal(Object message, Throwable t); - - /** - * Issue a log message and throwable with a level of FATAL and a specific logger class name. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - void fatal(String loggerFqcn, Object message, Throwable t); - - /** - * Issue a log message with parameters and a throwable with a level of FATAL. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - void fatal(String loggerFqcn, Object message, Object[] params, Throwable t); - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param params the parameters - */ - void fatalv(String format, Object... params); - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the sole parameter - */ - void fatalv(String format, Object param1); - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void fatalv(String format, Object param1, Object param2); - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void fatalv(String format, Object param1, Object param2, Object param3); - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - void fatalv(Throwable t, String format, Object... params); - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - void fatalv(Throwable t, String format, Object param1); - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void fatalv(Throwable t, String format, Object param1, Object param2); - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void fatalv(Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - void fatalf(String format, Object... params); - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - void fatalf(String format, Object param1); - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - void fatalf(String format, Object param1, Object param2); - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void fatalf(String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - void fatalf(Throwable t, String format, Object... params); - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - void fatalf(Throwable t, String format, Object param1); - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - void fatalf(Throwable t, String format, Object param1, Object param2); - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void fatalf(Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Log a message at the given level. - * - * @param level the level - * @param message the message - */ - void log(Logger.Level level, Object message); - - /** - * Issue a log message and throwable at the given log level. - * - * @param level the level - * @param message the message - * @param t the throwable - */ - void log(Logger.Level level, Object message, Throwable t); - - /** - * Issue a log message and throwable at the given log level and a specific logger class name. - * - * @param level the level - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - void log(Logger.Level level, String loggerFqcn, Object message, Throwable t); - - /** - * Issue a log message with parameters and a throwable at the given log level. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - void log(String loggerFqcn, Logger.Level level, Object message, Object[] params, Throwable t); - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param format the message format string - * @param params the parameters - */ - void logv(Logger.Level level, String format, Object... params); - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param format the message format string - * @param param1 the sole parameter - */ - void logv(Logger.Level level, String format, Object param1); - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void logv(Logger.Level level, String format, Object param1, Object param2); - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void logv(Logger.Level level, String format, Object param1, Object param2, Object param3); - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - void logv(Logger.Level level, Throwable t, String format, Object... params); - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - void logv(Logger.Level level, Throwable t, String format, Object param1); - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void logv(Logger.Level level, Throwable t, String format, Object param1, Object param2); - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void logv(Logger.Level level, Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - void logv(String loggerFqcn, Logger.Level level, Throwable t, String format, Object... params); - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - void logv(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1); - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - void logv(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1, Object param2); - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void logv(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - void logf(Logger.Level level, String format, Object... params); - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - void logf(Logger.Level level, String format, Object param1); - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - void logf(Logger.Level level, String format, Object param1, Object param2); - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void logf(Logger.Level level, String format, Object param1, Object param2, Object param3); - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - void logf(Logger.Level level, Throwable t, String format, Object... params); - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - void logf(Logger.Level level, Throwable t, String format, Object param1); - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - void logf(Logger.Level level, Throwable t, String format, Object param1, Object param2); - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void logf(Logger.Level level, Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Log a message at the given level. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable cause - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - void logf(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1); - - /** - * Log a message at the given level. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable cause - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - void logf(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1, Object param2); - - /** - * Log a message at the given level. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable cause - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - void logf(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1, Object param2, Object param3); - - /** - * Log a message at the given level. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable cause - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the message parameters - */ - void logf(String loggerFqcn, Logger.Level level, Throwable t, String format, Object... params); -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/DelegatingBasicLogger.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/DelegatingBasicLogger.java deleted file mode 100644 index 128fca299cdae..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/DelegatingBasicLogger.java +++ /dev/null @@ -1,1251 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import com.oracle.svm.core.annotate.AlwaysInline; - -import java.io.Serializable; - -/** - * A serializable, delegating basic logger instance. - * - * @author David M. Lloyd - */ -public class DelegatingBasicLogger implements BasicLogger, Serializable { - - private static final long serialVersionUID = -5774903162389601853L; - - /** - * The cached logger class name. - */ - private static final String FQCN = DelegatingBasicLogger.class.getName(); - - /** - * The delegate logger. - */ - protected final Logger log; - - /** - * Construct a new instance. - * - * @param log the logger to which calls should be delegated - */ - public DelegatingBasicLogger(final Logger log) { - this.log = log; - } - - @Override - @AlwaysInline("Fast level checks") - public boolean isTraceEnabled() { - return log.isTraceEnabled(); - } - - @Override - @AlwaysInline("Fast level checks") - public void trace(final Object message) { - log.trace(FQCN, message, null); - } - - @Override - @AlwaysInline("Fast level checks") - public void trace(final Object message, final Throwable t) { - log.trace(FQCN, message, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void trace(final String loggerFqcn, final Object message, final Throwable t) { - log.trace(loggerFqcn, message, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void trace(final String loggerFqcn, final Object message, final Object[] params, final Throwable t) { - log.trace(loggerFqcn, message, params, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracev(final String format, final Object... params) { - log.logv(FQCN, Logger.Level.TRACE, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracev(final String format, final Object param1) { - log.logv(FQCN, Logger.Level.TRACE, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracev(final String format, final Object param1, final Object param2) { - log.logv(FQCN, Logger.Level.TRACE, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracev(final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, Logger.Level.TRACE, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracev(final Throwable t, final String format, final Object... params) { - log.logv(FQCN, Logger.Level.TRACE, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracev(final Throwable t, final String format, final Object param1) { - log.logv(FQCN, Logger.Level.TRACE, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracev(final Throwable t, final String format, final Object param1, final Object param2) { - log.logv(FQCN, Logger.Level.TRACE, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracev(final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, Logger.Level.TRACE, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final Object... params) { - log.logf(FQCN, Logger.Level.TRACE, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final Object param1) { - log.logf(FQCN, Logger.Level.TRACE, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final Object param1, final Object param2) { - log.logf(FQCN, Logger.Level.TRACE, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, Logger.Level.TRACE, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final Object... params) { - log.logf(FQCN, Logger.Level.TRACE, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final Object param1) { - log.logf(FQCN, Logger.Level.TRACE, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final Object param1, final Object param2) { - log.logf(FQCN, Logger.Level.TRACE, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, Logger.Level.TRACE, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final int arg) { - log.tracef(format, arg); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final int arg1, final int arg2) { - log.tracef(format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final int arg1, final Object arg2) { - log.tracef(format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final int arg1, final int arg2, final int arg3) { - log.tracef(format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final int arg1, final int arg2, final Object arg3) { - log.tracef(format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final int arg1, final Object arg2, final Object arg3) { - log.tracef(format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final int arg) { - log.tracef(t, format, arg); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final int arg1, final int arg2) { - log.tracef(t, format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final int arg1, final Object arg2) { - log.tracef(t, format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final int arg1, final int arg2, final int arg3) { - log.tracef(t, format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final int arg1, final int arg2, final Object arg3) { - log.tracef(t, format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final int arg1, final Object arg2, final Object arg3) { - log.tracef(t, format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final long arg) { - log.tracef(format, arg); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final long arg1, final long arg2) { - log.tracef(format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final long arg1, final Object arg2) { - log.tracef(format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final long arg1, final long arg2, final long arg3) { - log.tracef(format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final long arg1, final long arg2, final Object arg3) { - log.tracef(format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final String format, final long arg1, final Object arg2, final Object arg3) { - log.tracef(format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final long arg) { - log.tracef(t, format, arg); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final long arg1, final long arg2) { - log.tracef(t, format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final long arg1, final Object arg2) { - log.tracef(t, format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final long arg1, final long arg2, final long arg3) { - log.tracef(t, format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final long arg1, final long arg2, final Object arg3) { - log.tracef(t, format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final long arg1, final Object arg2, final Object arg3) { - log.tracef(t, format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public boolean isDebugEnabled() { - return log.isDebugEnabled(); - } - - @Override - @AlwaysInline("Fast level checks") - public void debug(final Object message) { - log.debug(FQCN, message, null); - } - - @Override - @AlwaysInline("Fast level checks") - public void debug(final Object message, final Throwable t) { - log.debug(FQCN, message, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void debug(final String loggerFqcn, final Object message, final Throwable t) { - log.debug(loggerFqcn, message, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void debug(final String loggerFqcn, final Object message, final Object[] params, final Throwable t) { - log.debug(loggerFqcn, message, params, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugv(final String format, final Object... params) { - log.logv(FQCN, Logger.Level.DEBUG, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugv(final String format, final Object param1) { - log.logv(FQCN, Logger.Level.DEBUG, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugv(final String format, final Object param1, final Object param2) { - log.logv(FQCN, Logger.Level.DEBUG, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugv(final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, Logger.Level.DEBUG, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugv(final Throwable t, final String format, final Object... params) { - log.logv(FQCN, Logger.Level.DEBUG, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugv(final Throwable t, final String format, final Object param1) { - log.logv(FQCN, Logger.Level.DEBUG, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugv(final Throwable t, final String format, final Object param1, final Object param2) { - log.logv(FQCN, Logger.Level.DEBUG, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugv(final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, Logger.Level.DEBUG, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final Object... params) { - log.logf(FQCN, Logger.Level.DEBUG, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final Object param1) { - log.logf(FQCN, Logger.Level.DEBUG, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final Object param1, final Object param2) { - log.logf(FQCN, Logger.Level.DEBUG, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, Logger.Level.DEBUG, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final Object... params) { - log.logf(FQCN, Logger.Level.DEBUG, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final Object param1) { - log.logf(FQCN, Logger.Level.DEBUG, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final Object param1, final Object param2) { - log.logf(FQCN, Logger.Level.DEBUG, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, Logger.Level.DEBUG, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final int arg) { - log.debugf(format, arg); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final int arg1, final int arg2) { - log.debugf(format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final int arg1, final Object arg2) { - log.debugf(format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final int arg1, final int arg2, final int arg3) { - log.debugf(format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final int arg1, final int arg2, final Object arg3) { - log.debugf(format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final int arg1, final Object arg2, final Object arg3) { - log.debugf(format, arg1, arg2, arg3); - } - - @AlwaysInline("Fast level checks") - @Override - public void debugf(final Throwable t, final String format, final int arg) { - log.debugf(t, format, arg); - } - - @AlwaysInline("Fast level checks") - @Override - public void debugf(final Throwable t, final String format, final int arg1, final int arg2) { - log.debugf(t, format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final int arg1, final Object arg2) { - log.debugf(t, format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final int arg1, final int arg2, final int arg3) { - log.debugf(t, format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final int arg1, final int arg2, final Object arg3) { - log.debugf(t, format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final int arg1, final Object arg2, final Object arg3) { - log.debugf(t, format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final long arg) { - log.debugf(format, arg); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final long arg1, final long arg2) { - log.debugf(format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final long arg1, final Object arg2) { - log.debugf(format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final long arg1, final long arg2, final long arg3) { - log.debugf(format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final long arg1, final long arg2, final Object arg3) { - log.debugf(format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final String format, final long arg1, final Object arg2, final Object arg3) { - log.debugf(format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final long arg) { - log.debugf(t, format, arg); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final long arg1, final long arg2) { - log.debugf(t, format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final long arg1, final Object arg2) { - log.debugf(t, format, arg1, arg2); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final long arg1, final long arg2, final long arg3) { - log.debugf(t, format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final long arg1, final long arg2, final Object arg3) { - log.debugf(t, format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final long arg1, final Object arg2, final Object arg3) { - log.debugf(t, format, arg1, arg2, arg3); - } - - @Override - @AlwaysInline("Fast level checks") - public boolean isInfoEnabled() { - return log.isInfoEnabled(); - } - - @Override - @AlwaysInline("Fast level checks") - public void info(final Object message) { - log.info(FQCN, message, null); - } - - @Override - @AlwaysInline("Fast level checks") - public void info(final Object message, final Throwable t) { - log.info(FQCN, message, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void info(final String loggerFqcn, final Object message, final Throwable t) { - log.info(loggerFqcn, message, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void info(final String loggerFqcn, final Object message, final Object[] params, final Throwable t) { - log.info(loggerFqcn, message, params, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void infov(final String format, final Object... params) { - log.logv(FQCN, Logger.Level.INFO, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void infov(final String format, final Object param1) { - log.logv(FQCN, Logger.Level.INFO, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void infov(final String format, final Object param1, final Object param2) { - log.logv(FQCN, Logger.Level.INFO, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void infov(final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, Logger.Level.INFO, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void infov(final Throwable t, final String format, final Object... params) { - log.logv(FQCN, Logger.Level.INFO, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void infov(final Throwable t, final String format, final Object param1) { - log.logv(FQCN, Logger.Level.INFO, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void infov(final Throwable t, final String format, final Object param1, final Object param2) { - log.logv(FQCN, Logger.Level.INFO, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void infov(final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, Logger.Level.INFO, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void infof(final String format, final Object... params) { - log.logf(FQCN, Logger.Level.INFO, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void infof(final String format, final Object param1) { - log.logf(FQCN, Logger.Level.INFO, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void infof(final String format, final Object param1, final Object param2) { - log.logf(FQCN, Logger.Level.INFO, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void infof(final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, Logger.Level.INFO, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void infof(final Throwable t, final String format, final Object... params) { - log.logf(FQCN, Logger.Level.INFO, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void infof(final Throwable t, final String format, final Object param1) { - log.logf(FQCN, Logger.Level.INFO, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void infof(final Throwable t, final String format, final Object param1, final Object param2) { - log.logf(FQCN, Logger.Level.INFO, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void infof(final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, Logger.Level.INFO, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void warn(final Object message) { - log.warn(FQCN, message, null); - } - - @Override - @AlwaysInline("Fast level checks") - public void warn(final Object message, final Throwable t) { - log.warn(FQCN, message, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void warn(final String loggerFqcn, final Object message, final Throwable t) { - log.warn(loggerFqcn, message, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void warn(final String loggerFqcn, final Object message, final Object[] params, final Throwable t) { - log.warn(loggerFqcn, message, params, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnv(final String format, final Object... params) { - log.logv(FQCN, Logger.Level.WARN, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnv(final String format, final Object param1) { - log.logv(FQCN, Logger.Level.WARN, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnv(final String format, final Object param1, final Object param2) { - log.logv(FQCN, Logger.Level.WARN, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnv(final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, Logger.Level.WARN, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnv(final Throwable t, final String format, final Object... params) { - log.logv(FQCN, Logger.Level.WARN, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnv(final Throwable t, final String format, final Object param1) { - log.logv(FQCN, Logger.Level.WARN, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnv(final Throwable t, final String format, final Object param1, final Object param2) { - log.logv(FQCN, Logger.Level.WARN, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnv(final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, Logger.Level.WARN, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnf(final String format, final Object... params) { - log.logf(FQCN, Logger.Level.WARN, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnf(final String format, final Object param1) { - log.logf(FQCN, Logger.Level.WARN, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnf(final String format, final Object param1, final Object param2) { - log.logf(FQCN, Logger.Level.WARN, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnf(final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, Logger.Level.WARN, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnf(final Throwable t, final String format, final Object... params) { - log.logf(FQCN, Logger.Level.WARN, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnf(final Throwable t, final String format, final Object param1) { - log.logf(FQCN, Logger.Level.WARN, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnf(final Throwable t, final String format, final Object param1, final Object param2) { - log.logf(FQCN, Logger.Level.WARN, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void warnf(final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, Logger.Level.WARN, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void error(final Object message) { - log.error(FQCN, message, null); - } - - @Override - @AlwaysInline("Fast level checks") - public void error(final Object message, final Throwable t) { - log.error(FQCN, message, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void error(final String loggerFqcn, final Object message, final Throwable t) { - log.error(loggerFqcn, message, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void error(final String loggerFqcn, final Object message, final Object[] params, final Throwable t) { - log.error(loggerFqcn, message, params, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorv(final String format, final Object... params) { - log.logv(FQCN, Logger.Level.ERROR, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorv(final String format, final Object param1) { - log.logv(FQCN, Logger.Level.ERROR, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorv(final String format, final Object param1, final Object param2) { - log.logv(FQCN, Logger.Level.ERROR, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorv(final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, Logger.Level.ERROR, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorv(final Throwable t, final String format, final Object... params) { - log.logv(FQCN, Logger.Level.ERROR, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorv(final Throwable t, final String format, final Object param1) { - log.logv(FQCN, Logger.Level.ERROR, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorv(final Throwable t, final String format, final Object param1, final Object param2) { - log.logv(FQCN, Logger.Level.ERROR, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorv(final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, Logger.Level.ERROR, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorf(final String format, final Object... params) { - log.logf(FQCN, Logger.Level.ERROR, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorf(final String format, final Object param1) { - log.logf(FQCN, Logger.Level.ERROR, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorf(final String format, final Object param1, final Object param2) { - log.logf(FQCN, Logger.Level.ERROR, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorf(final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, Logger.Level.ERROR, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorf(final Throwable t, final String format, final Object... params) { - log.logf(FQCN, Logger.Level.ERROR, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorf(final Throwable t, final String format, final Object param1) { - log.logf(FQCN, Logger.Level.ERROR, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorf(final Throwable t, final String format, final Object param1, final Object param2) { - log.logf(FQCN, Logger.Level.ERROR, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void errorf(final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, Logger.Level.ERROR, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatal(final Object message) { - log.fatal(FQCN, message, null); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatal(final Object message, final Throwable t) { - log.fatal(FQCN, message, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatal(final String loggerFqcn, final Object message, final Throwable t) { - log.fatal(loggerFqcn, message, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatal(final String loggerFqcn, final Object message, final Object[] params, final Throwable t) { - log.fatal(loggerFqcn, message, params, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalv(final String format, final Object... params) { - log.logv(FQCN, Logger.Level.FATAL, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalv(final String format, final Object param1) { - log.logv(FQCN, Logger.Level.FATAL, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalv(final String format, final Object param1, final Object param2) { - log.logv(FQCN, Logger.Level.FATAL, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalv(final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, Logger.Level.FATAL, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalv(final Throwable t, final String format, final Object... params) { - log.logv(FQCN, Logger.Level.FATAL, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalv(final Throwable t, final String format, final Object param1) { - log.logv(FQCN, Logger.Level.FATAL, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalv(final Throwable t, final String format, final Object param1, final Object param2) { - log.logv(FQCN, Logger.Level.FATAL, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalv(final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, Logger.Level.FATAL, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalf(final String format, final Object... params) { - log.logf(FQCN, Logger.Level.FATAL, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalf(final String format, final Object param1) { - log.logf(FQCN, Logger.Level.FATAL, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalf(final String format, final Object param1, final Object param2) { - log.logf(FQCN, Logger.Level.FATAL, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalf(final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, Logger.Level.FATAL, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalf(final Throwable t, final String format, final Object... params) { - log.logf(FQCN, Logger.Level.FATAL, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalf(final Throwable t, final String format, final Object param1) { - log.logf(FQCN, Logger.Level.FATAL, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalf(final Throwable t, final String format, final Object param1, final Object param2) { - log.logf(FQCN, Logger.Level.FATAL, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void fatalf(final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, Logger.Level.FATAL, t, format, param1, param2, param3); - } - - - @Override - @AlwaysInline("Fast level checks") - public void log(final Logger.Level level, final Object message) { - log.log(FQCN, level, message, null, null); - } - - @Override - @AlwaysInline("Fast level checks") - public void log(final Logger.Level level, final Object message, final Throwable t) { - log.log(FQCN, level, message, null, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void log(final Logger.Level level, final String loggerFqcn, final Object message, final Throwable t) { - log.log(level, loggerFqcn, message, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void log(final String loggerFqcn, final Logger.Level level, final Object message, final Object[] params, final Throwable t) { - log.log(loggerFqcn, level, message, params, t); - } - - @Override - @AlwaysInline("Fast level checks") - public void logv(final Logger.Level level, final String format, final Object... params) { - log.logv(FQCN, level, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void logv(final Logger.Level level, final String format, final Object param1) { - log.logv(FQCN, level, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void logv(final Logger.Level level, final String format, final Object param1, final Object param2) { - log.logv(FQCN, level, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void logv(final Logger.Level level, final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, level, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void logv(final Logger.Level level, final Throwable t, final String format, final Object... params) { - log.logv(FQCN, level, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void logv(final Logger.Level level, final Throwable t, final String format, final Object param1) { - log.logv(FQCN, level, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void logv(final Logger.Level level, final Throwable t, final String format, final Object param1, final Object param2) { - log.logv(FQCN, level, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void logv(final Logger.Level level, final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logv(FQCN, level, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void logv(final String loggerFqcn, final Logger.Level level, final Throwable t, final String format, final Object... params) { - log.logv(loggerFqcn, level, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void logv(final String loggerFqcn, final Logger.Level level, final Throwable t, final String format, final Object param1) { - log.logv(loggerFqcn, level, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void logv(final String loggerFqcn, final Logger.Level level, final Throwable t, final String format, final Object param1, final Object param2) { - log.logv(loggerFqcn, level, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void logv(final String loggerFqcn, final Logger.Level level, final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logv(loggerFqcn, level, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void logf(final Logger.Level level, final String format, final Object... params) { - log.logf(FQCN, level, null, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void logf(final Logger.Level level, final String format, final Object param1) { - log.logf(FQCN, level, null, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void logf(final Logger.Level level, final String format, final Object param1, final Object param2) { - log.logf(FQCN, level, null, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void logf(final Logger.Level level, final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, level, null, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void logf(final Logger.Level level, final Throwable t, final String format, final Object... params) { - log.logf(FQCN, level, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public void logf(final Logger.Level level, final Throwable t, final String format, final Object param1) { - log.logf(FQCN, level, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void logf(final Logger.Level level, final Throwable t, final String format, final Object param1, final Object param2) { - log.logf(FQCN, level, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void logf(final Logger.Level level, final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logf(FQCN, level, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void logf(final String loggerFqcn, final Logger.Level level, final Throwable t, final String format, final Object param1) { - log.logf(loggerFqcn, level, t, format, param1); - } - - @Override - @AlwaysInline("Fast level checks") - public void logf(final String loggerFqcn, final Logger.Level level, final Throwable t, final String format, final Object param1, final Object param2) { - log.logf(loggerFqcn, level, t, format, param1, param2); - } - - @Override - @AlwaysInline("Fast level checks") - public void logf(final String loggerFqcn, final Logger.Level level, final Throwable t, final String format, final Object param1, final Object param2, final Object param3) { - log.logf(loggerFqcn, level, t, format, param1, param2, param3); - } - - @Override - @AlwaysInline("Fast level checks") - public void logf(final String loggerFqcn, final Logger.Level level, final Throwable t, final String format, final Object... params) { - log.logf(loggerFqcn, level, t, format, params); - } - - @Override - @AlwaysInline("Fast level checks") - public boolean isEnabled(final Logger.Level level) { - return log.isEnabled(level); - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JBossLogManagerLogger.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JBossLogManagerLogger.java deleted file mode 100644 index f03eda807ef35..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JBossLogManagerLogger.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import com.oracle.svm.core.annotate.AlwaysInline; -import org.jboss.logmanager.ExtLogRecord; - -final class JBossLogManagerLogger extends Logger { - - private static final long serialVersionUID = 7429618317727584742L; - - private final org.jboss.logmanager.Logger logger; - - JBossLogManagerLogger(final String name, final org.jboss.logmanager.Logger logger) { - super(name); - this.logger = logger; - } - - @AlwaysInline("Fast level checks") - public boolean isEnabled(final Level level) { - return logger.isLoggable(translate(level)); - } - - protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) { - java.util.logging.Level translatedLevel = translate(level); - if (logger.isLoggable(translatedLevel)) { - if (parameters == null) { - logger.log(loggerClassName, translatedLevel, String.valueOf(message), thrown); - } else { - logger.log(loggerClassName, translatedLevel, String.valueOf(message), ExtLogRecord.FormatStyle.MESSAGE_FORMAT, parameters, thrown); - } - } - } - - protected void doLogf(final Level level, final String loggerClassName, final String format, final Object[] parameters, final Throwable thrown) { - if (parameters == null) { - logger.log(loggerClassName, translate(level), format, thrown); - } else { - logger.log(loggerClassName, translate(level), format, ExtLogRecord.FormatStyle.PRINTF, parameters, thrown); - } - } - - @AlwaysInline("Fast level checks") - private static java.util.logging.Level translate(final Level level) { - if (level == Level.TRACE) { - return org.jboss.logmanager.Level.TRACE; - } else if (level == Level.DEBUG) { - return org.jboss.logmanager.Level.DEBUG; - } - return infoOrHigher(level); - } - - @AlwaysInline("Fast level checks") - private static java.util.logging.Level infoOrHigher(final Level level) { - if (level == Level.INFO) { - return org.jboss.logmanager.Level.INFO; - } else if (level == Level.WARN) { - return org.jboss.logmanager.Level.WARN; - } else if (level == Level.ERROR) { - return org.jboss.logmanager.Level.ERROR; - } else if (level == Level.FATAL) { - return org.jboss.logmanager.Level.FATAL; - } - return org.jboss.logmanager.Level.ALL; - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JBossLogManagerProvider.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JBossLogManagerProvider.java deleted file mode 100644 index 2941770aec76a..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JBossLogManagerProvider.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import org.jboss.logmanager.MDC; -import org.jboss.logmanager.NDC; - -import java.util.Map; - -final class JBossLogManagerProvider implements LoggerProvider { - - public Logger getLogger(final String name) { - return new JBossLogManagerLogger(name, org.jboss.logmanager.Logger.getLogger(name)); - } - - public void clearMdc() { - MDC.clear(); - } - - public Object putMdc(final String key, final Object value) { - return MDC.put(key, String.valueOf(value)); - } - - public Object getMdc(final String key) { - return MDC.get(key); - } - - public void removeMdc(final String key) { - MDC.remove(key); - } - - @SuppressWarnings({ "unchecked" }) - public Map getMdcMap() { - // we can re-define the erasure of this map because MDC does not make further use of the copy - return (Map)MDC.copy(); - } - - public void clearNdc() { - NDC.clear(); - } - - public String getNdc() { - return NDC.get(); - } - - public int getNdcDepth() { - return NDC.getDepth(); - } - - public String popNdc() { - return NDC.pop(); - } - - public String peekNdc() { - return NDC.get(); - } - - public void pushNdc(final String message) { - NDC.push(message); - } - - public void setNdcMaxDepth(final int maxDepth) { - NDC.trimTo(maxDepth); - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JBossLogRecord.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JBossLogRecord.java deleted file mode 100644 index dec428591b66e..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JBossLogRecord.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.util.logging.Level; -import java.util.logging.LogRecord; - -class JBossLogRecord extends LogRecord { - - private static final long serialVersionUID = 2492784413065296060L; - private static final String LOGGER_CLASS_NAME = Logger.class.getName(); - - private boolean resolved; - private final String loggerClassName; - - JBossLogRecord(final Level level, final String msg) { - super(level, msg); - loggerClassName = LOGGER_CLASS_NAME; - } - - JBossLogRecord(final Level level, final String msg, final String loggerClassName) { - super(level, msg); - this.loggerClassName = loggerClassName; - } - - public String getSourceClassName() { - if (! resolved) { - resolve(); - } - return super.getSourceClassName(); - } - - public void setSourceClassName(final String sourceClassName) { - resolved = true; - super.setSourceClassName(sourceClassName); - } - - public String getSourceMethodName() { - if (! resolved) { - resolve(); - } - return super.getSourceMethodName(); - } - - public void setSourceMethodName(final String sourceMethodName) { - resolved = true; - super.setSourceMethodName(sourceMethodName); - } - - private void resolve() { - resolved = true; - final StackTraceElement[] stack = new Throwable().getStackTrace(); - boolean found = false; - for (StackTraceElement element : stack) { - final String className = element.getClassName(); - if (found) { - if (! loggerClassName.equals(className)) { - setSourceClassName(className); - setSourceMethodName(element.getMethodName()); - return; - } - } else { - found = loggerClassName.equals(className); - } - } - setSourceClassName(""); - setSourceMethodName(""); - } - - protected Object writeReplace() { - final LogRecord replacement = new LogRecord(getLevel(), getMessage()); - replacement.setResourceBundle(getResourceBundle()); - replacement.setLoggerName(getLoggerName()); - replacement.setMillis(getMillis()); - replacement.setParameters(getParameters()); - replacement.setResourceBundleName(getResourceBundleName()); - replacement.setSequenceNumber(getSequenceNumber()); - replacement.setSourceClassName(getSourceClassName()); - replacement.setSourceMethodName(getSourceMethodName()); - replacement.setThreadID(getThreadID()); - replacement.setThrown(getThrown()); - return replacement; - } - -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JDKLevel.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JDKLevel.java deleted file mode 100644 index 5c85e7118a9c6..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JDKLevel.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.util.logging.Level; - -/** - * Levels used by the JDK logging back end. - */ -final class JDKLevel extends Level { - - private static final long serialVersionUID = 1L; - - protected JDKLevel(final String name, final int value) { - super(name, value); - } - - protected JDKLevel(final String name, final int value, final String resourceBundleName) { - super(name, value, resourceBundleName); - } - - public static final JDKLevel FATAL = new JDKLevel("FATAL", 1100); - public static final JDKLevel ERROR = new JDKLevel("ERROR", 1000); - public static final JDKLevel WARN = new JDKLevel("WARN", 900); - @SuppressWarnings("hiding") - public static final JDKLevel INFO = new JDKLevel("INFO", 800); - public static final JDKLevel DEBUG = new JDKLevel("DEBUG", 500); - public static final JDKLevel TRACE = new JDKLevel("TRACE", 400); -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JDKLogger.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JDKLogger.java deleted file mode 100644 index c899bb51b89fd..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JDKLogger.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -final class JDKLogger extends Logger { - - private static final long serialVersionUID = 2563174097983721393L; - - @SuppressWarnings({ "NonConstantLogger" }) - private transient final java.util.logging.Logger logger; - - public JDKLogger(final String name) { - super(name); - logger = java.util.logging.Logger.getLogger(name); - } - - protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) { - if (isEnabled(level)) try { - final JBossLogRecord rec = new JBossLogRecord(translate(level), String.valueOf(message), loggerClassName); - if (thrown != null) rec.setThrown(thrown); - rec.setLoggerName(getName()); - rec.setParameters(parameters); - rec.setResourceBundleName(logger.getResourceBundleName()); - rec.setResourceBundle(logger.getResourceBundle()); - logger.log(rec); - } catch (Throwable ignored) {} - } - - protected void doLogf(final Level level, final String loggerClassName, String format, final Object[] parameters, final Throwable thrown) { - if (isEnabled(level)) try { - final ResourceBundle resourceBundle = logger.getResourceBundle(); - if (resourceBundle != null) try { - format = resourceBundle.getString(format); - } catch (MissingResourceException e) { - // ignore - } - final String msg = parameters == null ? String.format(format) : String.format(format, parameters); - final JBossLogRecord rec = new JBossLogRecord(translate(level), msg, loggerClassName); - if (thrown != null) rec.setThrown(thrown); - rec.setLoggerName(getName()); - rec.setResourceBundleName(logger.getResourceBundleName()); - // we've done all the business - rec.setResourceBundle(null); - rec.setParameters(null); - logger.log(rec); - } catch (Throwable ignored) {} - } - - private static java.util.logging.Level translate(final Level level) { - if (level == Level.TRACE) { - return JDKLevel.TRACE; - } else if (level == Level.DEBUG) { - return JDKLevel.DEBUG; - } - return infoOrHigher(level); - } - - private static java.util.logging.Level infoOrHigher(final Level level) { - if (level == Level.INFO) { - return JDKLevel.INFO; - } else if (level == Level.WARN) { - return JDKLevel.WARN; - } else if (level == Level.ERROR) { - return JDKLevel.ERROR; - } else if (level == Level.FATAL) { - return JDKLevel.FATAL; - } - return JDKLevel.ALL; - } - - public boolean isEnabled(final Level level) { - return logger.isLoggable(translate(level)); - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JDKLoggerProvider.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JDKLoggerProvider.java deleted file mode 100644 index ced4c8da248c8..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/JDKLoggerProvider.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -final class JDKLoggerProvider extends AbstractMdcLoggerProvider implements LoggerProvider { - - public Logger getLogger(final String name) { - return new JDKLogger(name); - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Log4j2Logger.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Log4j2Logger.java deleted file mode 100644 index 5ab8aff4cb394..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Log4j2Logger.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.LoggingException; -import org.apache.logging.log4j.message.MessageFormatMessageFactory; -import org.apache.logging.log4j.message.StringFormattedMessage; -import org.apache.logging.log4j.spi.AbstractLogger; - -final class Log4j2Logger extends Logger { - - private static final long serialVersionUID = -2507841068232627725L; - - private final AbstractLogger logger; - private final MessageFormatMessageFactory messageFactory; - - Log4j2Logger(final String name) { - super(name); - org.apache.logging.log4j.Logger logger = LogManager.getLogger(name); - if (!(logger instanceof AbstractLogger)) { - throw new LoggingException("The logger for [" + name + "] does not extend AbstractLogger. Actual logger: " + logger.getClass().getName()); - } - this.logger = (AbstractLogger)logger; - this.messageFactory = new MessageFormatMessageFactory(); - } - - @Override - public boolean isEnabled(final Level level) { - return this.logger.isEnabled(Log4j2Logger.translate(level)); - } - - @Override - protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) { - final org.apache.logging.log4j.Level translatedLevel = Log4j2Logger.translate(level); - if (this.logger.isEnabled(translatedLevel)) { - try { - this.logger.logMessage(loggerClassName, translatedLevel, null, - (parameters == null || parameters.length == 0) ? this.messageFactory.newMessage(message) : this.messageFactory.newMessage(String.valueOf(message), parameters), - thrown); - } catch (Throwable ignored) { } - } - } - - @Override - protected void doLogf(final Level level, final String loggerClassName, final String format, final Object[] parameters, final Throwable thrown) { - final org.apache.logging.log4j.Level translatedLevel = Log4j2Logger.translate(level); - if (this.logger.isEnabled(translatedLevel)) { - try { - this.logger.logMessage(loggerClassName, translatedLevel, null, new StringFormattedMessage(format, parameters), thrown); - } catch (Throwable ignored) { } - } - } - - private static org.apache.logging.log4j.Level translate(final Level level) { - if (level == Level.TRACE) { - return org.apache.logging.log4j.Level.TRACE; - } else if (level == Level.DEBUG) { - return org.apache.logging.log4j.Level.DEBUG; - } - return infoOrHigher(level); - } - - private static org.apache.logging.log4j.Level infoOrHigher(final Level level) { - if (level == Level.INFO) { - return org.apache.logging.log4j.Level.INFO; - } else if (level == Level.WARN) { - return org.apache.logging.log4j.Level.WARN; - } else if (level == Level.ERROR) { - return org.apache.logging.log4j.Level.ERROR; - } else if (level == Level.FATAL) { - return org.apache.logging.log4j.Level.FATAL; - } - return org.apache.logging.log4j.Level.ALL; - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Log4j2LoggerProvider.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Log4j2LoggerProvider.java deleted file mode 100644 index 4dfe9f4ad367a..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Log4j2LoggerProvider.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.util.HashMap; -import java.util.Map; - -import org.apache.logging.log4j.ThreadContext; - -final class Log4j2LoggerProvider implements LoggerProvider { - - @Override - public Log4j2Logger getLogger(String name) { - return new Log4j2Logger(name); - } - - @Override - public void clearMdc() { - ThreadContext.clearMap(); - } - - @Override - public Object putMdc(String key, Object value) { - try { - return ThreadContext.get(key); - } finally { - ThreadContext.put(key, String.valueOf(value)); - } - } - - @Override - public Object getMdc(String key) { - return ThreadContext.get(key); - } - - @Override - public void removeMdc(String key) { - ThreadContext.remove(key); - } - - @Override - public Map getMdcMap() { - return new HashMap(ThreadContext.getImmutableContext()); - } - - @Override - public void clearNdc() { - ThreadContext.clearStack(); - } - - @Override - public String getNdc() { - return ThreadContext.peek(); - } - - @Override - public int getNdcDepth() { - return ThreadContext.getDepth(); - } - - @Override - public String popNdc() { - return ThreadContext.pop(); - } - - @Override - public String peekNdc() { - return ThreadContext.peek(); - } - - @Override - public void pushNdc(String message) { - ThreadContext.push(message); - } - - @Override - public void setNdcMaxDepth(int maxDepth) { - ThreadContext.trim(maxDepth); - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Log4jLogger.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Log4jLogger.java deleted file mode 100644 index edcc274c57ee2..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Log4jLogger.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.text.MessageFormat; - -final class Log4jLogger extends Logger { - - private static final long serialVersionUID = -5446154366955151335L; - - private final org.apache.log4j.Logger logger; - - Log4jLogger(final String name) { - super(name); - logger = org.apache.log4j.Logger.getLogger(name); - } - - public boolean isEnabled(final Level level) { - final org.apache.log4j.Level l = translate(level); - return logger.isEnabledFor(l) && l.isGreaterOrEqual(logger.getEffectiveLevel()); - } - - protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) { - final org.apache.log4j.Level translatedLevel = translate(level); - if (logger.isEnabledFor(translatedLevel)) try { - logger.log(loggerClassName, translatedLevel, parameters == null || parameters.length == 0 ? message : MessageFormat.format(String.valueOf(message), parameters), thrown); - } catch (Throwable ignored) {} - } - - protected void doLogf(final Level level, final String loggerClassName, final String format, final Object[] parameters, final Throwable thrown) { - final org.apache.log4j.Level translatedLevel = translate(level); - if (logger.isEnabledFor(translatedLevel)) try { - logger.log(loggerClassName, translatedLevel, parameters == null ? String.format(format) : String.format(format, parameters), thrown); - } catch (Throwable ignored) {} - } - - private static org.apache.log4j.Level translate(final Level level) { - if (level == Level.TRACE) { - return org.apache.log4j.Level.TRACE; - } else if (level == Level.DEBUG) { - return org.apache.log4j.Level.DEBUG; - } - return infoOrHigher(level); - } - - private static org.apache.log4j.Level infoOrHigher(final Level level) { - if (level == Level.INFO) { - return org.apache.log4j.Level.INFO; - } else if (level == Level.WARN) { - return org.apache.log4j.Level.WARN; - } else if (level == Level.ERROR) { - return org.apache.log4j.Level.ERROR; - } else if (level == Level.FATAL) { - return org.apache.log4j.Level.FATAL; - } - return org.apache.log4j.Level.ALL; - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Log4jLoggerProvider.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Log4jLoggerProvider.java deleted file mode 100644 index 330417c47bce6..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Log4jLoggerProvider.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.util.Collections; -import java.util.Map; - -import org.apache.log4j.MDC; -import org.apache.log4j.NDC; - -final class Log4jLoggerProvider implements LoggerProvider { - - public Logger getLogger(final String name) { - return new Log4jLogger("".equals(name) ? "ROOT" : name); - } - - public void clearMdc() { - MDC.clear(); - } - - public Object getMdc(String key) { - return MDC.get(key); - } - - public Map getMdcMap() { - @SuppressWarnings("unchecked") - final Map map = MDC.getContext(); - return map == null ? Collections.emptyMap() : map; - } - - public Object putMdc(String key, Object val) { - try { - return MDC.get(key); - } finally { - MDC.put(key, val); - } - } - - public void removeMdc(String key) { - MDC.remove(key); - } - - public void clearNdc() { - NDC.remove(); - } - - public String getNdc() { - return NDC.get(); - } - - public int getNdcDepth() { - return NDC.getDepth(); - } - - public String peekNdc() { - return NDC.peek(); - } - - public String popNdc() { - return NDC.pop(); - } - - public void pushNdc(String message) { - NDC.push(message); - } - - public void setNdcMaxDepth(int maxDepth) { - NDC.setMaxDepth(maxDepth); - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Logger.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Logger.java deleted file mode 100644 index a68faad1412d3..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Logger.java +++ /dev/null @@ -1,2723 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import com.oracle.svm.core.annotate.AlwaysInline; - -import java.io.Serializable; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.security.PrivilegedAction; -import java.util.Locale; - -import static java.security.AccessController.doPrivileged; - -/** - * An abstracted logging entry point. - */ -public abstract class Logger implements Serializable, BasicLogger { - - private static final long serialVersionUID = 4232175575988879434L; - - private static final String FQCN = Logger.class.getName(); - - /** - * Levels used by this logging API. - */ - public enum Level { - FATAL, - ERROR, - WARN, - INFO, - DEBUG, - TRACE, - } - - private final String name; - - /** - * Construct a new instance. - * - * @param name the logger category name - */ - protected Logger(final String name) { - this.name = name; - } - - /** - * Return the name of this logger. - * - * @return The name of this logger. - */ - public String getName() { - return name; - } - - /** - * Implementation log method (standard parameter formatting). - * - * @param level the level - * @param loggerClassName the logger class name - * @param message the message to log - * @param parameters the parameters of the message - * @param thrown the exception which was thrown, if any - */ - protected abstract void doLog(Level level, String loggerClassName, Object message, Object[] parameters, Throwable thrown); - - /** - * Implementation log method (printf formatting). - * - * @param level the level - * @param loggerClassName the logger class name - * @param format the format string to log - * @param parameters the parameters of the message - * @param thrown the exception which was thrown, if any - */ - protected abstract void doLogf(Level level, String loggerClassName, String format, Object[] parameters, Throwable thrown); - - /** - * Check to see if the {@code TRACE} level is enabled for this logger. - * - * @return {@code true} if messages logged at {@link Level#TRACE} may be accepted, {@code false} otherwise - */ - @AlwaysInline("Fast level checks") - public boolean isTraceEnabled() { - return isEnabled(Level.TRACE); - } - - /** - * Issue a log message with a level of TRACE. - * - * @param message the message - */ - @AlwaysInline("Fast level checks") - public void trace(Object message) { - doLog(Level.TRACE, FQCN, message, null, null); - } - - /** - * Issue a log message and throwable with a level of TRACE. - * - * @param message the message - * @param t the throwable - */ - @AlwaysInline("Fast level checks") - public void trace(Object message, Throwable t) { - doLog(Level.TRACE, FQCN, message, null, t); - } - - /** - * Issue a log message and throwable with a level of TRACE and a specific logger class name. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - @AlwaysInline("Fast level checks") - public void trace(String loggerFqcn, Object message, Throwable t) { - doLog(Level.TRACE, loggerFqcn, message, null, t); - } - - /** - * Issue a log message with parameters with a level of TRACE. - * - * @param message the message - * @param params the message parameters - * @deprecated To log a message with parameters, using {@link #tracev(String, Object...)} is recommended. - */ - @Deprecated - @AlwaysInline("Fast level checks") - public void trace(Object message, Object[] params) { - doLog(Level.TRACE, FQCN, message, params, null); - } - - /** - * Issue a log message with parameters and a throwable with a level of TRACE. - * - * @param message the message - * @param params the message parameters - * @param t the throwable - * @deprecated To log a message with parameters, using {@link #tracev(Throwable, String, Object...)} is recommended. - */ - @Deprecated - @AlwaysInline("Fast level checks") - public void trace(Object message, Object[] params, Throwable t) { - doLog(Level.TRACE, FQCN, message, params, t); - } - - /** - * Issue a log message with parameters and a throwable with a level of TRACE. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - @AlwaysInline("Fast level checks") - public void trace(String loggerFqcn, Object message, Object[] params, Throwable t) { - doLog(Level.TRACE, loggerFqcn, message, params, t); - } - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param params the parameters - */ - @AlwaysInline("Fast level checks") - public void tracev(String format, Object... params) { - doLog(Level.TRACE, FQCN, format, params, null); - } - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void tracev(String format, Object param1) { - if (isEnabled(Level.TRACE)) { - doLog(Level.TRACE, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void tracev(String format, Object param1, Object param2) { - if (isEnabled(Level.TRACE)) { - doLog(Level.TRACE, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void tracev(String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.TRACE)) { - doLog(Level.TRACE, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - @AlwaysInline("Fast level checks") - public void tracev(Throwable t, String format, Object... params) { - doLog(Level.TRACE, FQCN, format, params, t); - } - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void tracev(Throwable t, String format, Object param1) { - if (isEnabled(Level.TRACE)) { - doLog(Level.TRACE, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void tracev(Throwable t, String format, Object param1, Object param2) { - if (isEnabled(Level.TRACE)) { - doLog(Level.TRACE, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void tracev(Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.TRACE)) { - doLog(Level.TRACE, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - @AlwaysInline("Fast level checks") - public void tracef(String format, Object... params) { - doLogf(Level.TRACE, FQCN, format, params, null); - } - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void tracef(String format, Object param1) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void tracef(String format, Object param1, Object param2) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void tracef(String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - @AlwaysInline("Fast level checks") - public void tracef(Throwable t, String format, Object... params) { - doLogf(Level.TRACE, FQCN, format, params, t); - } - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void tracef(Throwable t, String format, Object param1) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void tracef(Throwable t, String format, Object param1, Object param2) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a formatted log message with a level of TRACE. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void tracef(Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final String format, final int arg) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg }, null); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final String format, final int arg1, final int arg2) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final String format, final int arg1, final Object arg2) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final String format, final int arg1, final int arg2, final int arg3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final String format, final int arg1, final int arg2, final Object arg3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final String format, final int arg1, final Object arg2, final Object arg3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final int arg) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg }, t); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final int arg1, final int arg2) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final int arg1, final Object arg2) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final int arg1, final int arg2, final int arg3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final int arg1, final int arg2, final Object arg3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final int arg1, final Object arg2, final Object arg3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final String format, final long arg) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg }, null); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final String format, final long arg1, final long arg2) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final String format, final long arg1, final Object arg2) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final String format, final long arg1, final long arg2, final long arg3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final String format, final long arg1, final long arg2, final Object arg3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final String format, final long arg1, final Object arg2, final Object arg3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final long arg) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg }, t); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final long arg1, final long arg2) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final long arg1, final Object arg2) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final long arg1, final long arg2, final long arg3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final long arg1, final long arg2, final Object arg3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void tracef(final Throwable t, final String format, final long arg1, final Object arg2, final Object arg3) { - if (isEnabled(Level.TRACE)) { - doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, t); - } - } - - /** - * Check to see if the {@code DEBUG} level is enabled for this logger. - * - * @return {@code true} if messages logged at {@link Level#DEBUG} may be accepted, {@code false} otherwise - */ - @AlwaysInline("Fast level checks") - public boolean isDebugEnabled() { - return isEnabled(Level.DEBUG); - } - - /** - * Issue a log message with a level of DEBUG. - * - * @param message the message - */ - @AlwaysInline("Fast level checks") - public void debug(Object message) { - doLog(Level.DEBUG, FQCN, message, null, null); - } - - /** - * Issue a log message and throwable with a level of DEBUG. - * - * @param message the message - * @param t the throwable - */ - @AlwaysInline("Fast level checks") - public void debug(Object message, Throwable t) { - doLog(Level.DEBUG, FQCN, message, null, t); - } - - /** - * Issue a log message and throwable with a level of DEBUG and a specific logger class name. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - @AlwaysInline("Fast level checks") - public void debug(String loggerFqcn, Object message, Throwable t) { - doLog(Level.DEBUG, loggerFqcn, message, null, t); - } - - /** - * Issue a log message with parameters with a level of DEBUG. - * - * @param message the message - * @param params the message parameters - * @deprecated To log a message with parameters, using {@link #debugv(String, Object...)} is recommended. - */ - @Deprecated - @AlwaysInline("Fast level checks") - public void debug(Object message, Object[] params) { - doLog(Level.DEBUG, FQCN, message, params, null); - } - - /** - * Issue a log message with parameters and a throwable with a level of DEBUG. - * - * @param message the message - * @param params the message parameters - * @param t the throwable - * @deprecated To log a message with parameters, using {@link #debugv(Throwable, String, Object...)} is recommended. - */ - @Deprecated - @AlwaysInline("Fast level checks") - public void debug(Object message, Object[] params, Throwable t) { - doLog(Level.DEBUG, FQCN, message, params, t); - } - - /** - * Issue a log message with parameters and a throwable with a level of DEBUG. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - @AlwaysInline("Fast level checks") - public void debug(String loggerFqcn, Object message, Object[] params, Throwable t) { - doLog(Level.DEBUG, loggerFqcn, message, params, t); - } - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param params the parameters - */ - @AlwaysInline("Fast level checks") - public void debugv(String format, Object... params) { - doLog(Level.DEBUG, FQCN, format, params, null); - } - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void debugv(String format, Object param1) { - if (isEnabled(Level.DEBUG)) { - doLog(Level.DEBUG, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void debugv(String format, Object param1, Object param2) { - if (isEnabled(Level.DEBUG)) { - doLog(Level.DEBUG, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void debugv(String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.DEBUG)) { - doLog(Level.DEBUG, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - @AlwaysInline("Fast level checks") - public void debugv(Throwable t, String format, Object... params) { - doLog(Level.DEBUG, FQCN, format, params, t); - } - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void debugv(Throwable t, String format, Object param1) { - if (isEnabled(Level.DEBUG)) { - doLog(Level.DEBUG, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void debugv(Throwable t, String format, Object param1, Object param2) { - if (isEnabled(Level.DEBUG)) { - doLog(Level.DEBUG, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void debugv(Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.DEBUG)) { - doLog(Level.DEBUG, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - @AlwaysInline("Fast level checks") - public void debugf(String format, Object... params) { - doLogf(Level.DEBUG, FQCN, format, params, null); - } - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void debugf(String format, Object param1) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void debugf(String format, Object param1, Object param2) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void debugf(String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - @AlwaysInline("Fast level checks") - public void debugf(Throwable t, String format, Object... params) { - doLogf(Level.DEBUG, FQCN, format, params, t); - } - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void debugf(Throwable t, String format, Object param1) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void debugf(Throwable t, String format, Object param1, Object param2) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a formatted log message with a level of DEBUG. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void debugf(Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final String format, final int arg) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg }, null); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final String format, final int arg1, final int arg2) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final String format, final int arg1, final Object arg2) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final String format, final int arg1, final int arg2, final int arg3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final String format, final int arg1, final int arg2, final Object arg3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final String format, final int arg1, final Object arg2, final Object arg3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final int arg) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg }, t); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final int arg1, final int arg2) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final int arg1, final Object arg2) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final int arg1, final int arg2, final int arg3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final int arg1, final int arg2, final Object arg3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final int arg1, final Object arg2, final Object arg3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final String format, final long arg) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg }, null); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final String format, final long arg1, final long arg2) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final String format, final long arg1, final Object arg2) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final String format, final long arg1, final long arg2, final long arg3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final String format, final long arg1, final long arg2, final Object arg3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final String format, final long arg1, final Object arg2, final Object arg3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, null); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final long arg) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg }, t); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final long arg1, final long arg2) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final long arg1, final Object arg2) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final long arg1, final long arg2, final long arg3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final long arg1, final long arg2, final Object arg3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, t); - } - } - - @AlwaysInline("Fast level checks") - public void debugf(final Throwable t, final String format, final long arg1, final Object arg2, final Object arg3) { - if (isEnabled(Level.DEBUG)) { - doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, t); - } - } - - /** - * Check to see if the {@code INFO} level is enabled for this logger. - * - * @return {@code true} if messages logged at {@link Level#INFO} may be accepted, {@code false} otherwise - */ - @AlwaysInline("Fast level checks") - public boolean isInfoEnabled() { - return isEnabled(Level.INFO); - } - - /** - * Issue a log message with a level of INFO. - * - * @param message the message - */ - public void info(Object message) { - doLog(Level.INFO, FQCN, message, null, null); - } - - /** - * Issue a log message and throwable with a level of INFO. - * - * @param message the message - * @param t the throwable - */ - public void info(Object message, Throwable t) { - doLog(Level.INFO, FQCN, message, null, t); - } - - /** - * Issue a log message and throwable with a level of INFO and a specific logger class name. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - public void info(String loggerFqcn, Object message, Throwable t) { - doLog(Level.INFO, loggerFqcn, message, null, t); - } - - /** - * Issue a log message with parameters with a level of INFO. - * - * @param message the message - * @param params the message parameters - * @deprecated To log a message with parameters, using {@link #infov(String, Object...)} is recommended. - */ - @Deprecated - public void info(Object message, Object[] params) { - doLog(Level.INFO, FQCN, message, params, null); - } - - /** - * Issue a log message with parameters and a throwable with a level of INFO. - * - * @param message the message - * @param params the message parameters - * @param t the throwable - * @deprecated To log a message with parameters, using {@link #infov(Throwable, String, Object...)} is recommended. - */ - @Deprecated - public void info(Object message, Object[] params, Throwable t) { - doLog(Level.INFO, FQCN, message, params, t); - } - - /** - * Issue a log message with parameters and a throwable with a level of INFO. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - public void info(String loggerFqcn, Object message, Object[] params, Throwable t) { - doLog(Level.INFO, loggerFqcn, message, params, t); - } - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param params the parameters - */ - public void infov(String format, Object... params) { - doLog(Level.INFO, FQCN, format, params, null); - } - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the sole parameter - */ - public void infov(String format, Object param1) { - if (isEnabled(Level.INFO)) { - doLog(Level.INFO, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void infov(String format, Object param1, Object param2) { - if (isEnabled(Level.INFO)) { - doLog(Level.INFO, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void infov(String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.INFO)) { - doLog(Level.INFO, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - public void infov(Throwable t, String format, Object... params) { - doLog(Level.INFO, FQCN, format, params, t); - } - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - public void infov(Throwable t, String format, Object param1) { - if (isEnabled(Level.INFO)) { - doLog(Level.INFO, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void infov(Throwable t, String format, Object param1, Object param2) { - if (isEnabled(Level.INFO)) { - doLog(Level.INFO, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void infov(Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.INFO)) { - doLog(Level.INFO, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Issue a formatted log message with a level of INFO. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - public void infof(String format, Object... params) { - doLogf(Level.INFO, FQCN, format, params, null); - } - - /** - * Issue a formatted log message with a level of INFO. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - public void infof(String format, Object param1) { - if (isEnabled(Level.INFO)) { - doLogf(Level.INFO, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a formatted log message with a level of INFO. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void infof(String format, Object param1, Object param2) { - if (isEnabled(Level.INFO)) { - doLogf(Level.INFO, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a formatted log message with a level of INFO. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void infof(String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.INFO)) { - doLogf(Level.INFO, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a formatted log message with a level of INFO. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - public void infof(Throwable t, String format, Object... params) { - doLogf(Level.INFO, FQCN, format, params, t); - } - - /** - * Issue a formatted log message with a level of INFO. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - public void infof(Throwable t, String format, Object param1) { - if (isEnabled(Level.INFO)) { - doLogf(Level.INFO, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a formatted log message with a level of INFO. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void infof(Throwable t, String format, Object param1, Object param2) { - if (isEnabled(Level.INFO)) { - doLogf(Level.INFO, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a formatted log message with a level of INFO. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void infof(Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.INFO)) { - doLogf(Level.INFO, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Issue a log message with a level of WARN. - * - * @param message the message - */ - public void warn(Object message) { - doLog(Level.WARN, FQCN, message, null, null); - } - - /** - * Issue a log message and throwable with a level of WARN. - * - * @param message the message - * @param t the throwable - */ - public void warn(Object message, Throwable t) { - doLog(Level.WARN, FQCN, message, null, t); - } - - /** - * Issue a log message and throwable with a level of WARN and a specific logger class name. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - public void warn(String loggerFqcn, Object message, Throwable t) { - doLog(Level.WARN, loggerFqcn, message, null, t); - } - - /** - * Issue a log message with parameters with a level of WARN. - * - * @param message the message - * @param params the message parameters - * @deprecated To log a message with parameters, using {@link #warnv(String, Object...)} is recommended. - */ - @Deprecated - public void warn(Object message, Object[] params) { - doLog(Level.WARN, FQCN, message, params, null); - } - - /** - * Issue a log message with parameters and a throwable with a level of WARN. - * - * @param message the message - * @param params the message parameters - * @param t the throwable - * @deprecated To log a message with parameters, using {@link #warnv(Throwable, String, Object...)} is recommended. - */ - @Deprecated - public void warn(Object message, Object[] params, Throwable t) { - doLog(Level.WARN, FQCN, message, params, t); - } - - /** - * Issue a log message with parameters and a throwable with a level of WARN. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - public void warn(String loggerFqcn, Object message, Object[] params, Throwable t) { - doLog(Level.WARN, loggerFqcn, message, params, t); - } - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param params the parameters - */ - public void warnv(String format, Object... params) { - doLog(Level.WARN, FQCN, format, params, null); - } - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the sole parameter - */ - public void warnv(String format, Object param1) { - if (isEnabled(Level.WARN)) { - doLog(Level.WARN, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void warnv(String format, Object param1, Object param2) { - if (isEnabled(Level.WARN)) { - doLog(Level.WARN, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void warnv(String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.WARN)) { - doLog(Level.WARN, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - public void warnv(Throwable t, String format, Object... params) { - doLog(Level.WARN, FQCN, format, params, t); - } - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - public void warnv(Throwable t, String format, Object param1) { - if (isEnabled(Level.WARN)) { - doLog(Level.WARN, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void warnv(Throwable t, String format, Object param1, Object param2) { - if (isEnabled(Level.WARN)) { - doLog(Level.WARN, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void warnv(Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.WARN)) { - doLog(Level.WARN, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Issue a formatted log message with a level of WARN. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - public void warnf(String format, Object... params) { - doLogf(Level.WARN, FQCN, format, params, null); - } - - /** - * Issue a formatted log message with a level of WARN. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - public void warnf(String format, Object param1) { - if (isEnabled(Level.WARN)) { - doLogf(Level.WARN, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a formatted log message with a level of WARN. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void warnf(String format, Object param1, Object param2) { - if (isEnabled(Level.WARN)) { - doLogf(Level.WARN, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a formatted log message with a level of WARN. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void warnf(String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.WARN)) { - doLogf(Level.WARN, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a formatted log message with a level of WARN. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - public void warnf(Throwable t, String format, Object... params) { - doLogf(Level.WARN, FQCN, format, params, t); - } - - /** - * Issue a formatted log message with a level of WARN. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - public void warnf(Throwable t, String format, Object param1) { - if (isEnabled(Level.WARN)) { - doLogf(Level.WARN, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a formatted log message with a level of WARN. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void warnf(Throwable t, String format, Object param1, Object param2) { - if (isEnabled(Level.WARN)) { - doLogf(Level.WARN, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a formatted log message with a level of WARN. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void warnf(Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.WARN)) { - doLogf(Level.WARN, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Issue a log message with a level of ERROR. - * - * @param message the message - */ - public void error(Object message) { - doLog(Level.ERROR, FQCN, message, null, null); - } - - /** - * Issue a log message and throwable with a level of ERROR. - * - * @param message the message - * @param t the throwable - */ - public void error(Object message, Throwable t) { - doLog(Level.ERROR, FQCN, message, null, t); - } - - /** - * Issue a log message and throwable with a level of ERROR and a specific logger class name. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - public void error(String loggerFqcn, Object message, Throwable t) { - doLog(Level.ERROR, loggerFqcn, message, null, t); - } - - /** - * Issue a log message with parameters with a level of ERROR. - * - * @param message the message - * @param params the message parameters - * @deprecated To log a message with parameters, using {@link #errorv(String, Object...)} is recommended. - */ - @Deprecated - public void error(Object message, Object[] params) { - doLog(Level.ERROR, FQCN, message, params, null); - } - - /** - * Issue a log message with parameters and a throwable with a level of ERROR. - * - * @param message the message - * @param params the message parameters - * @param t the throwable - * @deprecated To log a message with parameters, using {@link #errorv(Throwable, String, Object...)} is recommended. - */ - @Deprecated - public void error(Object message, Object[] params, Throwable t) { - doLog(Level.ERROR, FQCN, message, params, t); - } - - /** - * Issue a log message with parameters and a throwable with a level of ERROR. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - public void error(String loggerFqcn, Object message, Object[] params, Throwable t) { - doLog(Level.ERROR, loggerFqcn, message, params, t); - } - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param params the parameters - */ - public void errorv(String format, Object... params) { - doLog(Level.ERROR, FQCN, format, params, null); - } - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the sole parameter - */ - public void errorv(String format, Object param1) { - if (isEnabled(Level.ERROR)) { - doLog(Level.ERROR, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void errorv(String format, Object param1, Object param2) { - if (isEnabled(Level.ERROR)) { - doLog(Level.ERROR, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void errorv(String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.ERROR)) { - doLog(Level.ERROR, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - public void errorv(Throwable t, String format, Object... params) { - doLog(Level.ERROR, FQCN, format, params, t); - } - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - public void errorv(Throwable t, String format, Object param1) { - if (isEnabled(Level.ERROR)) { - doLog(Level.ERROR, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void errorv(Throwable t, String format, Object param1, Object param2) { - if (isEnabled(Level.ERROR)) { - doLog(Level.ERROR, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void errorv(Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.ERROR)) { - doLog(Level.ERROR, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - public void errorf(String format, Object... params) { - doLogf(Level.ERROR, FQCN, format, params, null); - } - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - public void errorf(String format, Object param1) { - if (isEnabled(Level.ERROR)) { - doLogf(Level.ERROR, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void errorf(String format, Object param1, Object param2) { - if (isEnabled(Level.ERROR)) { - doLogf(Level.ERROR, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void errorf(String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.ERROR)) { - doLogf(Level.ERROR, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - public void errorf(Throwable t, String format, Object... params) { - doLogf(Level.ERROR, FQCN, format, params, t); - } - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - public void errorf(Throwable t, String format, Object param1) { - if (isEnabled(Level.ERROR)) { - doLogf(Level.ERROR, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void errorf(Throwable t, String format, Object param1, Object param2) { - if (isEnabled(Level.ERROR)) { - doLogf(Level.ERROR, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a formatted log message with a level of ERROR. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void errorf(Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.ERROR)) { - doLogf(Level.ERROR, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Issue a log message with a level of FATAL. - * - * @param message the message - */ - public void fatal(Object message) { - doLog(Level.FATAL, FQCN, message, null, null); - } - - /** - * Issue a log message and throwable with a level of FATAL. - * - * @param message the message - * @param t the throwable - */ - public void fatal(Object message, Throwable t) { - doLog(Level.FATAL, FQCN, message, null, t); - } - - /** - * Issue a log message and throwable with a level of FATAL and a specific logger class name. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - public void fatal(String loggerFqcn, Object message, Throwable t) { - doLog(Level.FATAL, loggerFqcn, message, null, t); - } - - /** - * Issue a log message with parameters with a level of FATAL. - * - * @param message the message - * @param params the message parameters - * @deprecated To log a message with parameters, using {@link #fatalv(String, Object...)} is recommended. - */ - @Deprecated - public void fatal(Object message, Object[] params) { - doLog(Level.FATAL, FQCN, message, params, null); - } - - /** - * Issue a log message with parameters and a throwable with a level of FATAL. - * - * @param message the message - * @param params the message parameters - * @param t the throwable - * @deprecated To log a message with parameters, using {@link #fatalv(Throwable, String, Object...)} is recommended. - */ - @Deprecated - public void fatal(Object message, Object[] params, Throwable t) { - doLog(Level.FATAL, FQCN, message, params, t); - } - - /** - * Issue a log message with parameters and a throwable with a level of FATAL. - * - * @param loggerFqcn the logger class name - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - public void fatal(String loggerFqcn, Object message, Object[] params, Throwable t) { - doLog(Level.FATAL, loggerFqcn, message, params, t); - } - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param params the parameters - */ - public void fatalv(String format, Object... params) { - doLog(Level.FATAL, FQCN, format, params, null); - } - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the sole parameter - */ - public void fatalv(String format, Object param1) { - if (isEnabled(Level.FATAL)) { - doLog(Level.FATAL, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void fatalv(String format, Object param1, Object param2) { - if (isEnabled(Level.FATAL)) { - doLog(Level.FATAL, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void fatalv(String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.FATAL)) { - doLog(Level.FATAL, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - public void fatalv(Throwable t, String format, Object... params) { - doLog(Level.FATAL, FQCN, format, params, t); - } - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - public void fatalv(Throwable t, String format, Object param1) { - if (isEnabled(Level.FATAL)) { - doLog(Level.FATAL, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void fatalv(Throwable t, String format, Object param1, Object param2) { - if (isEnabled(Level.FATAL)) { - doLog(Level.FATAL, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting. - * - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void fatalv(Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.FATAL)) { - doLog(Level.FATAL, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - public void fatalf(String format, Object... params) { - doLogf(Level.FATAL, FQCN, format, params, null); - } - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - public void fatalf(String format, Object param1) { - if (isEnabled(Level.FATAL)) { - doLogf(Level.FATAL, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void fatalf(String format, Object param1, Object param2) { - if (isEnabled(Level.FATAL)) { - doLogf(Level.FATAL, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void fatalf(String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.FATAL)) { - doLogf(Level.FATAL, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - public void fatalf(Throwable t, String format, Object... params) { - doLogf(Level.FATAL, FQCN, format, params, t); - } - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - public void fatalf(Throwable t, String format, Object param1) { - if (isEnabled(Level.FATAL)) { - doLogf(Level.FATAL, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - public void fatalf(Throwable t, String format, Object param1, Object param2) { - if (isEnabled(Level.FATAL)) { - doLogf(Level.FATAL, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a formatted log message with a level of FATAL. - * - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - public void fatalf(Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(Level.FATAL)) { - doLogf(Level.FATAL, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Log a message at the given level. - * - * @param level the level - * @param message the message - */ - @AlwaysInline("Fast level checks") - public void log(Level level, Object message) { - doLog(level, FQCN, message, null, null); - } - - /** - * Issue a log message and throwable at the given log level. - * - * @param level the level - * @param message the message - * @param t the throwable - */ - @AlwaysInline("Fast level checks") - public void log(Level level, Object message, Throwable t) { - doLog(level, FQCN, message, null, t); - } - - /** - * Issue a log message and throwable at the given log level and a specific logger class name. - * - * @param level the level - * @param loggerFqcn the logger class name - * @param message the message - * @param t the throwable - */ - @AlwaysInline("Fast level checks") - public void log(Level level, String loggerFqcn, Object message, Throwable t) { - doLog(level, loggerFqcn, message, null, t); - } - - /** - * Issue a log message with parameters at the given log level. - * - * @param level the level - * @param message the message - * @param params the message parameters - * @deprecated To log a message with parameters, using {@link #logv(Level, String, Object...)} is recommended. - */ - @Deprecated - @AlwaysInline("Fast level checks") - public void log(Level level, Object message, Object[] params) { - doLog(level, FQCN, message, params, null); - } - - /** - * Issue a log message with parameters and a throwable at the given log level. - * - * @param level the level - * @param message the message - * @param params the message parameters - * @param t the throwable - * @deprecated To log a message with parameters, using {@link #logv(Level, Throwable, String, Object...)} is recommended. - */ - @Deprecated - @AlwaysInline("Fast level checks") - public void log(Level level, Object message, Object[] params, Throwable t) { - doLog(level, FQCN, message, params, t); - } - - /** - * Issue a log message with parameters and a throwable at the given log level. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param message the message - * @param params the message parameters - * @param t the throwable - */ - @AlwaysInline("Fast level checks") - public void log(String loggerFqcn, Level level, Object message, Object[] params, Throwable t) { - doLog(level, loggerFqcn, message, params, t); - } - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param format the message format string - * @param params the parameters - */ - @AlwaysInline("Fast level checks") - public void logv(Level level, String format, Object... params) { - doLog(level, FQCN, format, params, null); - } - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param format the message format string - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void logv(Level level, String format, Object param1) { - if (isEnabled(level)) { - doLog(level, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void logv(Level level, String format, Object param1, Object param2) { - if (isEnabled(level)) { - doLog(level, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void logv(Level level, String format, Object param1, Object param2, Object param3) { - if (isEnabled(level)) { - doLog(level, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - @AlwaysInline("Fast level checks") - public void logv(Level level, Throwable t, String format, Object... params) { - doLog(level, FQCN, format, params, t); - } - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void logv(Level level, Throwable t, String format, Object param1) { - if (isEnabled(level)) { - doLog(level, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void logv(Level level, Throwable t, String format, Object param1, Object param2) { - if (isEnabled(level)) { - doLog(level, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param level the level - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void logv(Level level, Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(level)) { - doLog(level, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable - * @param format the message format string - * @param params the parameters - */ - @AlwaysInline("Fast level checks") - public void logv(String loggerFqcn, Level level, Throwable t, String format, Object... params) { - doLog(level, loggerFqcn, format, params, t); - } - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable - * @param format the message format string - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void logv(String loggerFqcn, Level level, Throwable t, String format, Object param1) { - if (isEnabled(level)) { - doLog(level, loggerFqcn, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void logv(String loggerFqcn, Level level, Throwable t, String format, Object param1, Object param2) { - if (isEnabled(level)) { - doLog(level, loggerFqcn, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable - * @param format the message format string - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void logv(String loggerFqcn, Level level, Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(level)) { - doLog(level, loggerFqcn, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the parameters - */ - @AlwaysInline("Fast level checks") - public void logf(Level level, String format, Object... params) { - doLogf(level, FQCN, format, params, null); - } - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void logf(Level level, String format, Object param1) { - if (isEnabled(level)) { - doLogf(level, FQCN, format, new Object[] { param1 }, null); - } - } - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void logf(Level level, String format, Object param1, Object param2) { - if (isEnabled(level)) { - doLogf(level, FQCN, format, new Object[] { param1, param2 }, null); - } - } - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void logf(Level level, String format, Object param1, Object param2, Object param3) { - if (isEnabled(level)) { - doLogf(level, FQCN, format, new Object[] { param1, param2, param3 }, null); - } - } - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param params the parameters - */ - @AlwaysInline("Fast level checks") - public void logf(Level level, Throwable t, String format, Object... params) { - doLogf(level, FQCN, format, params, t); - } - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void logf(Level level, Throwable t, String format, Object param1) { - if (isEnabled(level)) { - doLogf(level, FQCN, format, new Object[] { param1 }, t); - } - } - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void logf(Level level, Throwable t, String format, Object param1, Object param2) { - if (isEnabled(level)) { - doLogf(level, FQCN, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Issue a formatted log message at the given log level. - * - * @param level the level - * @param t the throwable - * @param format the format string, as per {@link String#format(String, Object...)} - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void logf(Level level, Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(level)) { - doLogf(level, FQCN, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Log a message at the given level. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable cause - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the sole parameter - */ - @AlwaysInline("Fast level checks") - public void logf(String loggerFqcn, Level level, Throwable t, String format, Object param1) { - if (isEnabled(level)) { - doLogf(level, loggerFqcn, format, new Object[] { param1 }, t); - } - } - - /** - * Log a message at the given level. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable cause - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - */ - @AlwaysInline("Fast level checks") - public void logf(String loggerFqcn, Level level, Throwable t, String format, Object param1, Object param2) { - if (isEnabled(level)) { - doLogf(level, loggerFqcn, format, new Object[] { param1, param2 }, t); - } - } - - /** - * Log a message at the given level. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable cause - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param param1 the first parameter - * @param param2 the second parameter - * @param param3 the third parameter - */ - @AlwaysInline("Fast level checks") - public void logf(String loggerFqcn, Level level, Throwable t, String format, Object param1, Object param2, Object param3) { - if (isEnabled(level)) { - doLogf(level, loggerFqcn, format, new Object[] { param1, param2, param3 }, t); - } - } - - /** - * Log a message at the given level. - * - * @param loggerFqcn the logger class name - * @param level the level - * @param t the throwable cause - * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor - * @param params the message parameters - */ - @AlwaysInline("Fast level checks") - public void logf(String loggerFqcn, Level level, Throwable t, String format, Object... params) { - doLogf(level, loggerFqcn, format, params, t); - } - - /** - * Read resolver; replaces deserialized instance with a canonical instance. - * - * @return the canonical logger instance - */ - protected final Object writeReplace() { - return new SerializedLogger(name); - } - - /** - * Get a Logger instance given the logger name. - * - * @param name the logger name - * - * @return the logger - */ - public static Logger getLogger(String name) { - try { - return LoggerProviders.PROVIDER.getLogger(name); - } catch (Throwable t) { - return NoOpLogger.getInstance(); - } - } - - /** - * Get a Logger instance given the logger name with the given suffix. - *

- *

This will include a logger separator between logger name and suffix. - * - * @param name the logger name - * @param suffix a suffix to append to the logger name - * - * @return the logger - */ - public static Logger getLogger(String name, String suffix) { - return getLogger(name == null || name.length() == 0 ? suffix : name + "." + suffix); - } - - /** - * Get a Logger instance given the name of a class. This simply calls create(clazz.getName()). - * - * @param clazz the Class whose name will be used as the logger name - * - * @return the logger - */ - public static Logger getLogger(Class clazz) { - return getLogger(clazz.getName()); - } - - /** - * Get a Logger instance given the name of a class with the given suffix. - *

- *

This will include a logger separator between logger name and suffix - * - * @param clazz the Class whose name will be used as the logger name - * @param suffix a suffix to append to the logger name - * - * @return the logger - */ - public static Logger getLogger(Class clazz, String suffix) { - return getLogger(clazz.getName(), suffix); - } - - /** - * Get a typed logger which implements the given interface. The current default locale will be used for the new logger. - * - * @param type the interface to implement - * @param category the logger category - * @param the logger type - * @return the typed logger - */ - public static T getMessageLogger(Class type, String category) { - return getMessageLogger(type, category, LoggingLocale.getLocale()); - } - - /** - * Get a typed logger which implements the given interface. The given locale will be used for the new logger. - * - * @param type the interface to implement - * @param category the logger category - * @param locale the locale for the new logger - * @param the logger type - * @return the typed logger - */ - public static T getMessageLogger(final Class type, final String category, final Locale locale) { - return doPrivileged(new PrivilegedAction() { - public T run() { - String language = locale.getLanguage(); - String country = locale.getCountry(); - String variant = locale.getVariant(); - - Class loggerClass = null; - final ClassLoader classLoader = type.getClassLoader(); - final String typeName = type.getName(); - if (variant != null && variant.length() > 0) try { - loggerClass = Class.forName(join(typeName, "$logger", language, country, variant), true, classLoader).asSubclass(type); - } catch (ClassNotFoundException e) { - // ignore - } - if (loggerClass == null && country != null && country.length() > 0) try { - loggerClass = Class.forName(join(typeName, "$logger", language, country, null), true, classLoader).asSubclass(type); - } catch (ClassNotFoundException e) { - // ignore - } - if (loggerClass == null && language != null && language.length() > 0) try { - loggerClass = Class.forName(join(typeName, "$logger", language, null, null), true, classLoader).asSubclass(type); - } catch (ClassNotFoundException e) { - // ignore - } - if (loggerClass == null) try { - loggerClass = Class.forName(join(typeName, "$logger", null, null, null), true, classLoader).asSubclass(type); - } catch (ClassNotFoundException e) { - throw new IllegalArgumentException("Invalid logger " + type + " (implementation not found in " + classLoader + ")"); - } - final Constructor constructor; - try { - constructor = loggerClass.getConstructor(Logger.class); - } catch (NoSuchMethodException e) { - throw new IllegalArgumentException("Logger implementation " + loggerClass + " has no matching constructor"); - } - try { - return constructor.newInstance(Logger.getLogger(category)); - } catch (InstantiationException e) { - throw new IllegalArgumentException("Logger implementation " + loggerClass + " could not be instantiated", e); - } catch (IllegalAccessException e) { - throw new IllegalArgumentException("Logger implementation " + loggerClass + " could not be instantiated", e); - } catch (InvocationTargetException e) { - throw new IllegalArgumentException("Logger implementation " + loggerClass + " could not be instantiated", e.getCause()); - } - } - }); - } - - private static String join(String interfaceName, String a, String b, String c, String d) { - final StringBuilder build = new StringBuilder(); - build.append(interfaceName).append('_').append(a); - if (b != null && b.length() > 0) { - build.append('_'); - build.append(b); - } - if (c != null && c.length() > 0) { - build.append('_'); - build.append(c); - } - if (d != null && d.length() > 0) { - build.append('_'); - build.append(d); - } - return build.toString(); - } -} \ No newline at end of file diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/LoggerProvider.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/LoggerProvider.java deleted file mode 100644 index d839c567154a0..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/LoggerProvider.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.util.Collections; -import java.util.Map; - -/** - * A contract for the log provider implementation. - */ -public interface LoggerProvider { - /** - * Returns a logger which is backed by a logger from the log provider. - * - *

- * Note: this should never be {@code null} - *

- * - * @param name the name of the logger - * - * @return a logger for the log provider logger. - */ - Logger getLogger(String name); - - /** - * Removes all entries from the message diagnostics context. - */ - void clearMdc(); - - /** - * Puts the value onto the message diagnostics context. - * - * @param key the key for the value - * @param value the value - * - * @return the previous value set or {@code null} if no value was set - */ - Object putMdc(String key, Object value); - - /** - * Returns the value for the key on the message diagnostics context or {@code null} if no value was found. - * - * @param key the key to lookup the value for - * - * @return the value or {@code null} if not found - */ - Object getMdc(String key); - - /** - * Removes the value from the message diagnostics context. - * - * @param key the key of the value to remove - */ - void removeMdc(String key); - - /** - * Returns the map from the context. - * - *

- * Note that in most implementations this is an expensive operation and should be used sparingly. - *

- * - * @return the map from the context or an {@linkplain Collections#emptyMap() empty map} if the context is {@code - * null} - */ - Map getMdcMap(); - - /** - * Clears the nested diagnostics context. - */ - void clearNdc(); - - /** - * Retrieves the current values set for the nested diagnostics context. - * - * @return the current value set or {@code null} if no value was set - */ - String getNdc(); - - /** - * The current depth of the nested diagnostics context. - * - * @return the current depth of the stack - */ - int getNdcDepth(); - - /** - * Pops top value from the stack and returns it. - * - * @return the top value from the stack or an empty string if no value was set - */ - String popNdc(); - - /** - * Peeks at the top value from the stack and returns it. - * - * @return the value or an empty string - */ - String peekNdc(); - - /** - * Pushes a value to the nested diagnostics context stack. - * - * @param message the message to push - */ - void pushNdc(String message); - - /** - * Sets maximum depth of the stack removing any entries below the maximum depth. - * - * @param maxDepth the maximum depth to set - */ - void setNdcMaxDepth(int maxDepth); -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/LoggerProviders.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/LoggerProviders.java deleted file mode 100644 index f3b2492efb688..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/LoggerProviders.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.Iterator; -import java.util.ServiceConfigurationError; -import java.util.ServiceLoader; -import java.util.logging.LogManager; - -final class LoggerProviders { - static final String LOGGING_PROVIDER_KEY = "org.jboss.logging.provider"; - - static final LoggerProvider PROVIDER = find(); - - private static LoggerProvider find() { - return findProvider(); - } - - private static LoggerProvider findProvider() { - // Since the impl classes refer to the back-end frameworks directly, if this classloader can't find the target - // log classes, then it doesn't really matter if they're possibly available from the TCCL because we won't be - // able to find it anyway - final ClassLoader cl = LoggerProviders.class.getClassLoader(); - try { - // Check the system property - final String loggerProvider = AccessController.doPrivileged(new PrivilegedAction() { - public String run() { - return System.getProperty(LOGGING_PROVIDER_KEY); - } - }); - if (loggerProvider != null) { - if ("jboss".equalsIgnoreCase(loggerProvider)) { - return tryJBossLogManager(cl, "system property"); - } else if ("jdk".equalsIgnoreCase(loggerProvider)) { - return tryJDK("system property"); - } else if ("log4j2".equalsIgnoreCase(loggerProvider)) { - return tryLog4j2(cl, "system property"); - } else if ("log4j".equalsIgnoreCase(loggerProvider)) { - return tryLog4j(cl, "system property"); - } else if ("slf4j".equalsIgnoreCase(loggerProvider)) { - return trySlf4j("system property"); - } - } - } catch (Throwable t) { - // nope... - } - - // Next try for a service provider - try { - final ServiceLoader loader = ServiceLoader.load(LoggerProvider.class, cl); - final Iterator iter = loader.iterator(); - for (; ; ) - try { - if (!iter.hasNext()) break; - LoggerProvider provider = iter.next(); - // Attempt to get a logger, if it fails keep trying - logProvider(provider, "service loader"); - return provider; - } catch (ServiceConfigurationError ignore) { - } - } catch (Throwable ignore) { - // TODO consider printing the stack trace as it should only happen once - } - - // Finally search the class path - try { - return tryJBossLogManager(cl, null); - } catch (Throwable t) { - // nope... - } - try { - // MUST try Log4j 2.x BEFORE Log4j 1.x because Log4j 2.x also passes Log4j 1.x test in some circumstances - return tryLog4j2(cl, null); - } catch (Throwable t) { - // nope... - } - try { - return tryLog4j(cl, null); - } catch (Throwable t) { - // nope... - } - try { - // only use slf4j if Logback is in use - Class.forName("ch.qos.logback.classic.Logger", false, cl); - return trySlf4j(null); - } catch (Throwable t) { - // nope... - } - return tryJDK(null); - } - - private static JDKLoggerProvider tryJDK(final String via) { - final JDKLoggerProvider provider = new JDKLoggerProvider(); - logProvider(provider, via); - return provider; - } - - private static LoggerProvider trySlf4j(final String via) { - final LoggerProvider provider = new Slf4jLoggerProvider(); - logProvider(provider, via); - return provider; - } - - // JBLOGGING-95 - Add support for Log4j 2.x - private static LoggerProvider tryLog4j2(final ClassLoader cl, final String via) throws ClassNotFoundException { - Class.forName("org.apache.logging.log4j.Logger", true, cl); - Class.forName("org.apache.logging.log4j.LogManager", true, cl); - Class.forName("org.apache.logging.log4j.spi.AbstractLogger", true, cl); - LoggerProvider provider = new Log4j2LoggerProvider(); - // if Log4j 2 has a bad implementation that doesn't extend AbstractLogger, we won't know until getting the first logger throws an exception - logProvider(provider, via); - return provider; - } - - private static LoggerProvider tryLog4j(final ClassLoader cl, final String via) throws ClassNotFoundException { - Class.forName("org.apache.log4j.LogManager", true, cl); - // JBLOGGING-65 - slf4j can disguise itself as log4j. Test for a class that slf4j doesn't provide. - // JBLOGGING-94 - JBoss Logging does not detect org.apache.logging.log4j:log4j-1.2-api:2.0 - Class.forName("org.apache.log4j.config.PropertySetter", true, cl); - final LoggerProvider provider = new Log4jLoggerProvider(); - logProvider(provider, via); - return provider; - } - - private static LoggerProvider tryJBossLogManager(final ClassLoader cl, final String via) throws ClassNotFoundException { - final Class logManagerClass = LogManager.getLogManager().getClass(); - if (logManagerClass == Class.forName("org.jboss.logmanager.LogManager", false, cl) - && Class.forName("org.jboss.logmanager.Logger$AttachmentKey", true, cl).getClassLoader() == logManagerClass.getClassLoader()) { - final LoggerProvider provider = new JBossLogManagerProvider(); - logProvider(provider, via); - return provider; - } - throw new IllegalStateException(); - } - - private static void logProvider(final LoggerProvider provider, final String via) { - // Log a debug message indicating which logger we are using - final Logger logger = provider.getLogger(LoggerProviders.class.getPackage().getName()); - if (via == null) { - logger.debugf("Logging Provider: %s", provider.getClass().getName()); - } else { - logger.debugf("Logging Provider: %s found via %s", provider.getClass().getName(), via); - } - } - - private LoggerProviders() { - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/LoggingLocale.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/LoggingLocale.java deleted file mode 100644 index 5311d6a6136e1..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/LoggingLocale.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.Locale; - -/** - * A simple utility to resolve the default locale to use for internationalized loggers and message bundles. - * - * @author James R. Perkins - */ -@SuppressWarnings("SameParameterValue") -class LoggingLocale { - - private static final Locale LOCALE = getDefaultLocale(); - - /** - * Attempts to create a {@link Locale} based on the {@code org.jboss.logging.locale} system property. If the value - * is not defined the {@linkplain Locale#getDefault() default locale} will be used. - *

- * The value should be in the BCP 47 format. - *

- *

- * Note: Currently this uses a custom parser to attempt to parse the BCP 47 format. This will be - * changed to use the {@code Locale.forLanguageTag()} once a move to JDK 7. Currently only the language, region and - * variant are used to construct the locale. - *

- * - * @return the locale created or the default locale - */ - static Locale getLocale() { - return LOCALE; - } - - private static Locale getDefaultLocale() { - final String bcp47Tag = AccessController.doPrivileged(new PrivilegedAction() { - @Override - public String run() { - return System.getProperty("org.jboss.logging.locale", ""); - } - }); - if (bcp47Tag.trim().isEmpty()) { - return Locale.getDefault(); - } - // When we upgrade to Java 7 we can use the Locale.forLanguageTag(locale) which will reliably parse the - // the value. For now we have to attempt to parse it the best we can. - return forLanguageTag(bcp47Tag); - } - - private static Locale forLanguageTag(final String locale) { - // First check known locales - if ("en-CA".equalsIgnoreCase(locale)) { - return Locale.CANADA; - } else if ("fr-CA".equalsIgnoreCase(locale)) { - return Locale.CANADA_FRENCH; - } else if ("zh".equalsIgnoreCase(locale)) { - return Locale.CHINESE; - } else if ("en".equalsIgnoreCase(locale)) { - return Locale.ENGLISH; - } else if ("fr-FR".equalsIgnoreCase(locale)) { - return Locale.FRANCE; - } else if ("fr".equalsIgnoreCase(locale)) { - return Locale.FRENCH; - } else if ("de".equalsIgnoreCase(locale)) { - return Locale.GERMAN; - } else if ("de-DE".equalsIgnoreCase(locale)) { - return Locale.GERMANY; - } else if ("it".equalsIgnoreCase(locale)) { - return Locale.ITALIAN; - } else if ("it-IT".equalsIgnoreCase(locale)) { - return Locale.ITALY; - } else if ("ja-JP".equalsIgnoreCase(locale)) { - return Locale.JAPAN; - } else if ("ja".equalsIgnoreCase(locale)) { - return Locale.JAPANESE; - } else if ("ko-KR".equalsIgnoreCase(locale)) { - return Locale.KOREA; - } else if ("ko".equalsIgnoreCase(locale)) { - return Locale.KOREAN; - } else if ("zh-CN".equalsIgnoreCase(locale)) { - return Locale.SIMPLIFIED_CHINESE; - } else if ("zh-TW".equalsIgnoreCase(locale)) { - return Locale.TRADITIONAL_CHINESE; - } else if ("en-UK".equalsIgnoreCase(locale)) { - return Locale.UK; - } else if ("en-US".equalsIgnoreCase(locale)) { - return Locale.US; - } - - // Split the string into parts and attempt - final String[] parts = locale.split("-"); - final int len = parts.length; - int index = 0; - int count = 0; - final String language = parts[index++]; - String region = ""; // country - String variant = ""; - // The next 3 sections may be extended languages, we're just going to ignore them - while (index < len) { - if (count++ == 2 || !isAlpha(parts[index], 3, 3)) { - break; - } - index++; - } - // Check for a script, we'll skip it however a script is not supported until Java 7 - if (index != len && isAlpha(parts[index], 4, 4)) { - index++; - } - // Next should be the region, 3 digit is allowed but may not work with Java 6 - if (index != len && (isAlpha(parts[index], 2, 2) || isNumeric(parts[index], 3, 3))) { - region = parts[index++]; - } - // Next should be the variant and we will just use the first one found, all other parts will be ignored - if (index != len && (isAlphaOrNumeric(parts[index], 5, 8))) { - variant = parts[index]; - } - return new Locale(language, region, variant); - } - - private static boolean isAlpha(final String value, final int minLen, final int maxLen) { - final int len = value.length(); - if (len < minLen || len > maxLen) { - return false; - } - for (int i = 0; i < len; i++) { - if (!Character.isLetter(value.charAt(i))) { - return false; - } - } - return true; - } - - private static boolean isNumeric(final String value, final int minLen, final int maxLen) { - final int len = value.length(); - if (len < minLen || len > maxLen) { - return false; - } - for (int i = 0; i < len; i++) { - if (!Character.isDigit(value.charAt(i))) { - return false; - } - } - return true; - } - - private static boolean isAlphaOrNumeric(final String value, final int minLen, final int maxLen) { - - final int len = value.length(); - if (len < minLen || len > maxLen) { - return false; - } - for (int i = 0; i < len; i++) { - if (!Character.isLetterOrDigit(value.charAt(i))) { - return false; - } - } - return true; - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/MDC.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/MDC.java deleted file mode 100644 index 001551153e83a..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/MDC.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.util.Collections; -import java.util.Map; - -/** - * Mapped diagnostic context. Each log provider implementation may behave different. - */ -public final class MDC { - - private MDC() { - } - - /** - * Puts the value onto the context. - * - * @param key the key for the value - * @param val the value - * - * @return the previous value set or {@code null} if no value was set - */ - public static Object put(String key, Object val) { - return LoggerProviders.PROVIDER.putMdc(key, val); - } - - /** - * Returns the value for the key or {@code null} if no value was found. - * - * @param key the key to lookup the value for - * - * @return the value or {@code null} if not found - */ - public static Object get(String key) { - return LoggerProviders.PROVIDER.getMdc(key); - } - - /** - * Removes the value from the context. - * - * @param key the key of the value to remove - */ - public static void remove(String key) { - LoggerProviders.PROVIDER.removeMdc(key); - } - - /** - * Returns the map from the context. - * - *

- * Note that in most implementations this is an expensive operation and should be used sparingly. - *

- * - * @return the map from the context or an {@linkplain Collections#emptyMap() empty map} if the context is {@code - * null} - */ - public static Map getMap() { - return LoggerProviders.PROVIDER.getMdcMap(); - } - - /** - * Clears the message diagnostics context. - */ - public static void clear() { - LoggerProviders.PROVIDER.clearMdc(); - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Messages.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Messages.java deleted file mode 100644 index ce84ad2110ee1..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Messages.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.lang.reflect.Field; -import java.security.PrivilegedAction; -import java.util.Locale; - -import static java.security.AccessController.doPrivileged; - -/** - * A factory class to produce message bundle implementations. - * - * @author David M. Lloyd - */ -public final class Messages { - - private Messages() { - } - - /** - * Get a message bundle of the given type. Equivalent to {@link #getBundle(Class, java.util.Locale) getBundle}(type, Locale.getDefault()). - * - * @param type the bundle type class - * @param the bundle type - * @return the bundle - */ - public static T getBundle(Class type) { - return getBundle(type, LoggingLocale.getLocale()); - } - - /** - * Get a message bundle of the given type. - * - * @param type the bundle type class - * @param locale the message locale to use - * @param the bundle type - * @return the bundle - */ - public static T getBundle(final Class type, final Locale locale) { - return doPrivileged(new PrivilegedAction() { - public T run() { - String language = locale.getLanguage(); - String country = locale.getCountry(); - String variant = locale.getVariant(); - - Class bundleClass = null; - if (variant != null && variant.length() > 0) try { - bundleClass = Class.forName(join(type.getName(), "$bundle", language, country, variant), true, type.getClassLoader()).asSubclass(type); - } catch (ClassNotFoundException e) { - // ignore - } - if (bundleClass == null && country != null && country.length() > 0) try { - bundleClass = Class.forName(join(type.getName(), "$bundle", language, country, null), true, type.getClassLoader()).asSubclass(type); - } catch (ClassNotFoundException e) { - // ignore - } - if (bundleClass == null && language != null && language.length() > 0) try { - bundleClass = Class.forName(join(type.getName(), "$bundle", language, null, null), true, type.getClassLoader()).asSubclass(type); - } catch (ClassNotFoundException e) { - // ignore - } - if (bundleClass == null) try { - bundleClass = Class.forName(join(type.getName(), "$bundle", null, null, null), true, type.getClassLoader()).asSubclass(type); - } catch (ClassNotFoundException e) { - throw new IllegalArgumentException("Invalid bundle " + type + " (implementation not found)"); - } - final Field field; - try { - field = bundleClass.getField("INSTANCE"); - } catch (NoSuchFieldException e) { - throw new IllegalArgumentException("Bundle implementation " + bundleClass + " has no instance field"); - } - try { - return type.cast(field.get(null)); - } catch (IllegalAccessException e) { - throw new IllegalArgumentException("Bundle implementation " + bundleClass + " could not be instantiated", e); - } - } - }); - } - - private static String join(String interfaceName, String a, String b, String c, String d) { - final StringBuilder build = new StringBuilder(); - build.append(interfaceName).append('_').append(a); - if (b != null && b.length() > 0) { - build.append('_'); - build.append(b); - } - if (c != null && c.length() > 0) { - build.append('_'); - build.append(c); - } - if (d != null && d.length() > 0) { - build.append('_'); - build.append(d); - } - return build.toString(); - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/NDC.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/NDC.java deleted file mode 100644 index 66d3933e59cc1..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/NDC.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -public final class NDC { - - private NDC() { - } - - /** - * Clears the nested diagnostics context. - */ - public static void clear() { - LoggerProviders.PROVIDER.clearNdc(); - } - - /** - * Retrieves the current values set for the nested diagnostics context. - * - * @return the current value set or {@code null} if no value was set - */ - public static String get() { - return LoggerProviders.PROVIDER.getNdc(); - } - - /** - * The current depth of the nested diagnostics context. - * - * @return the current depth of the stack - */ - public static int getDepth() { - return LoggerProviders.PROVIDER.getNdcDepth(); - } - - /** - * Pops top value from the stack and returns it. - * - * @return the top value from the stack or an empty string if no value was set - */ - public static String pop() { - return LoggerProviders.PROVIDER.popNdc(); - } - - /** - * Peeks at the top value from the stack and returns it. - * - * @return the value or an empty string - */ - public static String peek() { - return LoggerProviders.PROVIDER.peekNdc(); - } - - /** - * Pushes a value to the nested diagnostics context stack. - * - * @param message the message to push - */ - public static void push(String message) { - LoggerProviders.PROVIDER.pushNdc(message); - } - - /** - * Sets maximum depth of the stack removing any entries below the maximum depth. - * - * @param maxDepth the maximum depth to set - */ - public static void setMaxDepth(int maxDepth) { - LoggerProviders.PROVIDER.setNdcMaxDepth(maxDepth); - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/NoOpLogger.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/NoOpLogger.java deleted file mode 100644 index d409f88e989bf..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/NoOpLogger.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.jboss.logging; - -/** - */ -final class NoOpLogger extends Logger { - static final NoOpLogger INSTANCE = new NoOpLogger(); - - private NoOpLogger() { - super("unnamed"); - } - - static Logger getInstance() { - return INSTANCE; - } - - protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) { - } - - protected void doLogf(final Level level, final String loggerClassName, final String format, final Object[] parameters, final Throwable thrown) { - } - - public boolean isEnabled(final Level level) { - return false; - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/ParameterConverter.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/ParameterConverter.java deleted file mode 100644 index f160194458989..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/ParameterConverter.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.util.Locale; - -/** - * A converter for a specific parameter type. - * - * @author David M. Lloyd - * @param the input type - */ -public interface ParameterConverter { - - /** - * Convert the parameter to its string or string-equivalent representation. The returned value will be passed in - * as a parameter to either a {@link java.text.MessageFormat} or {@link java.util.Formatter} instance, depending - * on the setting of {@link Message#format()}. - * - * @param locale the locale - * @param parameter the parameter - * @return the converted value - */ - Object convert(Locale locale, I parameter); -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/SerializedLogger.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/SerializedLogger.java deleted file mode 100644 index 6778689964919..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/SerializedLogger.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.io.Serializable; - -final class SerializedLogger implements Serializable { - - private static final long serialVersionUID = 508779982439435831L; - - private final String name; - - SerializedLogger(final String name) { - this.name = name; - } - - protected Object readResolve() { - return Logger.getLogger(name); - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Slf4jLocationAwareLogger.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Slf4jLocationAwareLogger.java deleted file mode 100644 index dbfe0ab86fd8d..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Slf4jLocationAwareLogger.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.UndeclaredThrowableException; -import java.text.MessageFormat; -import org.slf4j.spi.LocationAwareLogger; - -final class Slf4jLocationAwareLogger extends Logger { - - private static final long serialVersionUID = 8685757928087758380L; - - private static final Object[] EMPTY = new Object[0]; - private static final boolean POST_1_6; - private static final Method LOG_METHOD; - - static { - Method[] methods = LocationAwareLogger.class.getDeclaredMethods(); - Method logMethod = null; - boolean post16 = false; - for (Method method : methods) { - if (method.getName().equals("log")) { - logMethod = method; - Class[] parameterTypes = method.getParameterTypes(); - post16 = parameterTypes.length == 6; - } - } - if (logMethod == null) { - throw new NoSuchMethodError("Cannot find LocationAwareLogger.log() method"); - } - POST_1_6 = post16; - LOG_METHOD = logMethod; - } - - private final LocationAwareLogger logger; - - Slf4jLocationAwareLogger(final String name, final LocationAwareLogger logger) { - super(name); - this.logger = logger; - } - - public boolean isEnabled(final Level level) { - if (level != null) switch (level) { - case FATAL: return logger.isErrorEnabled(); - case ERROR: return logger.isErrorEnabled(); - case WARN: return logger.isWarnEnabled(); - case INFO: return logger.isInfoEnabled(); - case DEBUG: return logger.isDebugEnabled(); - case TRACE: return logger.isTraceEnabled(); - } - return true; - } - - protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) { - if (isEnabled(level)) { - final String text = parameters == null || parameters.length == 0 ? String.valueOf(message) : MessageFormat.format(String.valueOf(message), parameters); - doLog(logger, loggerClassName, translate(level), text, thrown); - } - } - - protected void doLogf(final Level level, final String loggerClassName, final String format, final Object[] parameters, final Throwable thrown) { - if (isEnabled(level)) { - final String text = parameters == null ? String.format(format) : String.format(format, parameters); - doLog(logger, loggerClassName, translate(level), text, thrown); - } - } - - private static void doLog(LocationAwareLogger logger, String className, int level, String text, Throwable thrown) { - try { - if (POST_1_6) { - LOG_METHOD.invoke(logger, null, className, Integer.valueOf(level), text, EMPTY, thrown); - } else { - LOG_METHOD.invoke(logger, null, className, Integer.valueOf(level), text, thrown); - } - } catch (InvocationTargetException e) { - try { - throw e.getCause(); - } catch (RuntimeException ex) { - throw ex; - } catch (Error er) { - throw er; - } catch (Throwable throwable) { - throw new UndeclaredThrowableException(throwable); - } - } catch (IllegalAccessException e) { - throw new IllegalAccessError(e.getMessage()); - } - } - - private static int translate(Level level) { - if (level != null) switch (level) { - case FATAL: - case ERROR: return LocationAwareLogger.ERROR_INT; - case WARN: return LocationAwareLogger.WARN_INT; - case INFO: return LocationAwareLogger.INFO_INT; - case DEBUG: return LocationAwareLogger.DEBUG_INT; - case TRACE: return LocationAwareLogger.TRACE_INT; - } - return LocationAwareLogger.TRACE_INT; - } -} \ No newline at end of file diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Slf4jLogger.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Slf4jLogger.java deleted file mode 100644 index 3db63fdfe75cc..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Slf4jLogger.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.text.MessageFormat; - -final class Slf4jLogger extends Logger { - - private static final long serialVersionUID = 8685757928087758380L; - - private final org.slf4j.Logger logger; - - Slf4jLogger(final String name, final org.slf4j.Logger logger) { - super(name); - this.logger = logger; - } - - public boolean isEnabled(final Level level) { - if (level == Level.TRACE) { - return logger.isTraceEnabled(); - } else if (level == Level.DEBUG) { - return logger.isDebugEnabled(); - } - return infoOrHigherEnabled(level); - } - - private boolean infoOrHigherEnabled(final Level level) { - if (level == Level.INFO) { - return logger.isInfoEnabled(); - } else if (level == Level.WARN) { - return logger.isWarnEnabled(); - } else if (level == Level.ERROR || level == Level.FATAL) { - return logger.isErrorEnabled(); - } - return true; - } - - protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) { - if (isEnabled(level)) try { - final String text = parameters == null || parameters.length == 0 ? String.valueOf(message) : MessageFormat.format(String.valueOf(message), parameters); - if (level == Level.INFO) { - logger.info(text, thrown); - } else if (level == Level.WARN) { - logger.warn(text, thrown); - } else if (level == Level.ERROR || level == Level.FATAL) { - logger.error(text, thrown); - } else if (level == Level.DEBUG) { - logger.debug(text, thrown); - } else if (level == Level.TRACE) { - logger.debug(text, thrown); - } - } catch (Throwable ignored) {} - } - - protected void doLogf(final Level level, final String loggerClassName, final String format, final Object[] parameters, final Throwable thrown) { - if (isEnabled(level)) try { - final String text = parameters == null ? String.format(format) : String.format(format, parameters); - if (level == Level.INFO) { - logger.info(text, thrown); - } else if (level == Level.WARN) { - logger.warn(text, thrown); - } else if (level == Level.ERROR || level == Level.FATAL) { - logger.error(text, thrown); - } else if (level == Level.DEBUG) { - logger.debug(text, thrown); - } else if (level == Level.TRACE) { - logger.debug(text, thrown); - } - } catch (Throwable ignored) {} - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Slf4jLoggerProvider.java b/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Slf4jLoggerProvider.java deleted file mode 100644 index 115212861b774..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/java/org/jboss/logging/Slf4jLoggerProvider.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jboss.logging; - -import java.util.Collections; -import java.util.Map; - -import org.slf4j.LoggerFactory; -import org.slf4j.MDC; -import org.slf4j.spi.LocationAwareLogger; - -final class Slf4jLoggerProvider extends AbstractLoggerProvider implements LoggerProvider { - - public Logger getLogger(final String name) { - org.slf4j.Logger l = LoggerFactory.getLogger(name); - try { - return new Slf4jLocationAwareLogger(name, (LocationAwareLogger) l); - } catch (Throwable ignored) { - } - return new Slf4jLogger(name, l); - } - - public void clearMdc() { - MDC.clear(); - } - - public Object putMdc(final String key, final Object value) { - try { - return MDC.get(key); - } finally { - if (value == null) { - MDC.remove(key); - } else { - MDC.put(key, String.valueOf(value)); - } - } - } - - public Object getMdc(final String key) { - return MDC.get(key); - } - - public void removeMdc(final String key) { - MDC.remove(key); - } - - @SuppressWarnings({"unchecked"}) - public Map getMdcMap() { - final Map map = MDC.getCopyOfContextMap(); - return map == null ? Collections.emptyMap() : (Map) map; - } -} diff --git a/independent-projects/jboss-logging-embedded/src/main/resources/META-INF/LICENSE.txt b/independent-projects/jboss-logging-embedded/src/main/resources/META-INF/LICENSE.txt deleted file mode 100644 index d645695673349..0000000000000 --- a/independent-projects/jboss-logging-embedded/src/main/resources/META-INF/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/independent-projects/jboss-logmanager-embedded/src/main/java/org/jboss/logmanager/LogContext.java b/independent-projects/jboss-logmanager-embedded/src/main/java/org/jboss/logmanager/LogContext.java index a12433c766ef8..4ff1af984a8fb 100644 --- a/independent-projects/jboss-logmanager-embedded/src/main/java/org/jboss/logmanager/LogContext.java +++ b/independent-projects/jboss-logmanager-embedded/src/main/java/org/jboss/logmanager/LogContext.java @@ -86,6 +86,66 @@ private static LogContext create() { return new LogContext(); } + // Attachment mgmt + + /** + * Get the attachment value for a given key, or {@code null} if there is no such attachment. + * Log context attachments are placed on the root logger and can also be accessed there. + * + * @param key the key + * @param the attachment value type + * @return the attachment, or {@code null} if there is none for this key + */ + @SuppressWarnings({ "unchecked" }) + public V getAttachment(Logger.AttachmentKey key) { + return rootLogger.getAttachment(key); + } + + /** + * Attach an object to this log context under a given key. + * A strong reference is maintained to the key and value for as long as this log context exists. + * Log context attachments are placed on the root logger and can also be accessed there. + * + * @param key the attachment key + * @param value the attachment value + * @param the attachment value type + * @return the old attachment, if there was one + * @throws SecurityException if a security manager exists and if the caller does not have {@code LoggingPermission(control)} + */ + public V attach(Logger.AttachmentKey key, V value) throws SecurityException { + return rootLogger.attach(key, value); + } + + /** + * Attach an object to this log context under a given key, if such an attachment does not already exist. + * A strong reference is maintained to the key and value for as long as this log context exists. + * Log context attachments are placed on the root logger and can also be accessed there. + * + * @param key the attachment key + * @param value the attachment value + * @param the attachment value type + * @return the current attachment, if there is one, or {@code null} if the value was successfully attached + * @throws SecurityException if a security manager exists and if the caller does not have {@code LoggingPermission(control)} + */ + @SuppressWarnings({ "unchecked" }) + public V attachIfAbsent(Logger.AttachmentKey key, V value) throws SecurityException { + return rootLogger.attachIfAbsent(key, value); + } + + /** + * Remove an attachment. + * Log context attachments are placed on the root logger and can also be accessed there. + * + * @param key the attachment key + * @param the attachment value type + * @return the old value, or {@code null} if there was none + * @throws SecurityException if a security manager exists and if the caller does not have {@code LoggingPermission(control)} + */ + @SuppressWarnings({ "unchecked" }) + public V detach(Logger.AttachmentKey key) throws SecurityException { + return rootLogger.detach(key); + } + public static LogContext getLogContext() { return LogContext.getInstance(); } @@ -112,6 +172,20 @@ public Logger getLoggerIfExists(String name) { return node == null ? null : node.createLogger(); } + /** + * Get a logger attachment for a logger name, if it exists. + * + * @param loggerName the logger name + * @param key the attachment key + * @param the attachment value type + * @return the attachment or {@code null} if the logger or the attachment does not exist + */ + public V getAttachment(String loggerName, Logger.AttachmentKey key) { + final LoggerNode node = rootLogger.getIfExists(loggerName); + if (node == null) return null; + return node.getAttachment(key); + } + /** * Get the level for a name. * diff --git a/independent-projects/jboss-logmanager-embedded/src/main/java/org/jboss/logmanager/Logger.java b/independent-projects/jboss-logmanager-embedded/src/main/java/org/jboss/logmanager/Logger.java index 1f6b7a4c61181..3fcabdd66b4e0 100644 --- a/independent-projects/jboss-logmanager-embedded/src/main/java/org/jboss/logmanager/Logger.java +++ b/independent-projects/jboss-logmanager-embedded/src/main/java/org/jboss/logmanager/Logger.java @@ -22,6 +22,7 @@ import java.io.Serializable; import java.util.Arrays; import java.util.ResourceBundle; +import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Filter; import java.util.logging.Handler; import java.util.logging.Level; @@ -149,6 +150,63 @@ public boolean isLoggable(Level level) { return loggerNode.isLoggableLevel(level.intValue()); } + // Attachment mgmt + + /** + * Get the attachment value for a given key, or {@code null} if there is no such attachment. + * + * @param key the key + * @param the attachment value type + * @return the attachment, or {@code null} if there is none for this key + */ + @SuppressWarnings({"unchecked", "unused"}) + public V getAttachment(AttachmentKey key) { + return loggerNode.getAttachment(key); + } + + /** + * Attach an object to this logger under a given key. + * A strong reference is maintained to the key and value for as long as this logger exists. + * + * @param key the attachment key + * @param value the attachment value + * @param the attachment value type + * @return the old attachment, if there was one + * @throws SecurityException if a security manager exists and if the caller does not have {@code LoggingPermission(control)} + */ + @SuppressWarnings({"unchecked", "unused"}) + public V attach(AttachmentKey key, V value) throws SecurityException { + return loggerNode.attach(key, value); + } + + /** + * Attach an object to this logger under a given key, if such an attachment does not already exist. + * A strong reference is maintained to the key and value for as long as this logger exists. + * + * @param key the attachment key + * @param value the attachment value + * @param the attachment value type + * @return the current attachment, if there is one, or {@code null} if the value was successfully attached + * @throws SecurityException if a security manager exists and if the caller does not have {@code LoggingPermission(control)} + */ + @SuppressWarnings({"unchecked", "unused"}) + public V attachIfAbsent(AttachmentKey key, V value) throws SecurityException { + return loggerNode.attachIfAbsent(key, value); + } + + /** + * Remove an attachment. + * + * @param key the attachment key + * @param the attachment value type + * @return the old value, or {@code null} if there was none + * @throws SecurityException if a security manager exists and if the caller does not have {@code LoggingPermission(control)} + */ + @SuppressWarnings({"unchecked", "unused"}) + public V detach(AttachmentKey key) throws SecurityException { + return loggerNode.detach(key); + } + // Handler mgmt /** {@inheritDoc} */ @@ -706,14 +764,21 @@ public void logRaw(final LogRecord record) { * * @param the attachment value type */ - @SuppressWarnings({ "UnusedDeclaration" }) + @SuppressWarnings("unused") public static final class AttachmentKey { + private static final AtomicInteger idSeq = new AtomicInteger(); + + final int id = idSeq.getAndIncrement(); /** * Construct a new instance. */ public AttachmentKey() { } + + int getId() { + return id; + } } public String toString() { diff --git a/independent-projects/jboss-logmanager-embedded/src/main/java/org/jboss/logmanager/LoggerNode.java b/independent-projects/jboss-logmanager-embedded/src/main/java/org/jboss/logmanager/LoggerNode.java index 3eac98db756f9..ba7ae1018b106 100644 --- a/independent-projects/jboss-logmanager-embedded/src/main/java/org/jboss/logmanager/LoggerNode.java +++ b/independent-projects/jboss-logmanager-embedded/src/main/java/org/jboss/logmanager/LoggerNode.java @@ -17,6 +17,7 @@ package org.jboss.logmanager; import com.oracle.svm.core.annotate.AlwaysInline; +import org.wildfly.common.lock.SpinLock; import java.util.Collection; import java.util.concurrent.ConcurrentMap; @@ -32,6 +33,8 @@ */ final class LoggerNode { + private static final Object[] NO_ATTACHMENTS = new Object[0]; + /** * The log context. */ @@ -92,6 +95,12 @@ final class LoggerNode { private volatile boolean hasLogger; + private final SpinLock attachmentLock = new SpinLock(); + + private Logger.AttachmentKey attachmentKey; + + private Object attachment; + /** * Construct a new root instance. * @@ -351,6 +360,98 @@ Level getLevel() { return level; } + @SuppressWarnings({ "unchecked" }) + V getAttachment(final Logger.AttachmentKey key) { + if (key == null) { + throw new NullPointerException("key is null"); + } + final SpinLock lock = this.attachmentLock; + lock.lock(); + try { + return key == attachmentKey ? (V) attachment : null; + } finally { + lock.unlock(); + } + } + + @SuppressWarnings({ "unchecked" }) + V attach(final Logger.AttachmentKey key, final V value) { + if (key == null) { + throw new NullPointerException("key is null"); + } + if (value == null) { + throw new NullPointerException("value is null"); + } + final SpinLock lock = this.attachmentLock; + lock.lock(); + try { + final Logger.AttachmentKey attachmentKey = this.attachmentKey; + if (attachmentKey == null) { + this.attachmentKey = key; + attachment = value; + return null; + } else if (key == attachmentKey) { + try { + return (V) attachment; + } finally { + attachment = value; + } + } + } finally { + lock.unlock(); + } + throw new IllegalStateException("Maximum number of attachments exceeded"); + } + + @SuppressWarnings({ "unchecked" }) + V attachIfAbsent(final Logger.AttachmentKey key, final V value) { + if (key == null) { + throw new NullPointerException("key is null"); + } + if (value == null) { + throw new NullPointerException("value is null"); + } + final SpinLock lock = this.attachmentLock; + lock.lock(); + try { + final Logger.AttachmentKey attachmentKey = this.attachmentKey; + if (attachmentKey == null) { + this.attachmentKey = key; + attachment = value; + return null; + } else if (key == attachmentKey) { + return (V) attachment; + } + } finally { + lock.unlock(); + } + throw new IllegalStateException("Maximum number of attachments exceeded"); + } + + @SuppressWarnings({ "unchecked" }) + public V detach(final Logger.AttachmentKey key) { + if (key == null) { + throw new NullPointerException("key is null"); + } + final SpinLock lock = this.attachmentLock; + lock.lock(); + try { + final Logger.AttachmentKey attachmentKey = this.attachmentKey; + if (attachmentKey == key) { + try { + return (V) attachment; + } finally { + this.attachmentKey = null; + this.attachment = null; + } + } else { + return null; + } + } finally { + lock.unlock(); + } + } + LoggerNode getParent() { return parent; } diff --git a/integration-tests/infinispan-client/pom.xml b/integration-tests/infinispan-client/pom.xml index aa0a87035a8b2..2e521f1d67a7b 100644 --- a/integration-tests/infinispan-client/pom.xml +++ b/integration-tests/infinispan-client/pom.xml @@ -39,12 +39,6 @@ org.infinispan infinispan-remote-query-client - - - org.jboss.logging - jboss-logging - - diff --git a/pom.xml b/pom.xml index 0cd6988c4e80a..fc8bd283d7e7f 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,6 @@ independent-projects/arc independent-projects/infinispan-hibernate-cache-protean independent-projects/jboss-logmanager-embedded - independent-projects/jboss-logging-embedded independent-projects/panache independent-projects/vertx-axle-clients