Skip to content

Commit

Permalink
Merge pull request #470 from jamezp/LOGMGR-352-3.0
Browse files Browse the repository at this point in the history
[LOGMGR-352] Deprecate the per-thread log filters.
  • Loading branch information
jamezp committed Apr 24, 2024
2 parents 052c6f1 + 4c77f38 commit f70b4b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/jboss/logmanager/LogManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
*/
public final class LogManager extends java.util.logging.LogManager {

@Deprecated(forRemoval = true, since = "3.0.5")
public static final String PER_THREAD_LOG_FILTER_KEY = "org.jboss.logmanager.useThreadLocalFilter";
@Deprecated(forRemoval = true, since = "3.0.5")
static final boolean PER_THREAD_LOG_FILTER;

static {
Expand Down Expand Up @@ -244,7 +246,10 @@ public Logger getLogger(String name) {
* </p>
*
* @return the filter set for the thread or {@code null} if no level was set
* @deprecated this is mainly un-used code and a {@link Filter} attached to the root logger with
* {@link Logger#setUseParentFilters(boolean)} set to {@code true} should be enough
*/
@Deprecated(forRemoval = true, since = "3.0.5")
public static Filter getThreadLocalLogFilter() {
return PER_THREAD_LOG_FILTER ? LocalFilterHolder.LOCAL_FILTER.get() : null;
}
Expand All @@ -256,7 +261,10 @@ public static Filter getThreadLocalLogFilter() {
* </p>
*
* @param filter the filter to set for all loggers on this thread
* @deprecated this is mainly un-used code and a {@link Filter} attached to the root logger with
* {@link Logger#setUseParentFilters(boolean)} set to {@code true} should be enough
*/
@Deprecated(forRemoval = true, since = "3.0.5")
public static void setThreadLocalLogLevel(final Filter filter) {
if (PER_THREAD_LOG_FILTER) {
LocalFilterHolder.LOCAL_FILTER.set(filter);
Expand Down

0 comments on commit f70b4b8

Please sign in to comment.