Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LOGMGR-352] Deprecate the per-thread log filters. #470

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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