[slf4j-dev] [JIRA] Updates for SLF4J-522: Add contains() Method to NDC

QOS.CH (JIRA) noreply-jira at qos.ch
Thu Sep 9 05:43:00 CEST 2021


SLF4J / SLF4J-522 [Open]
Add contains() Method to NDC

==============================

Here's what changed in this issue in the last few minutes.
This issue has been created
This issue is now assigned to you.

View or comment on issue using this link
https://jira.qos.ch/browse/SLF4J-522

==============================
 Issue created
------------------------------

Michael Wooten created this issue on 09/Sep/21 5:30 AM
Summary:              Add contains() Method to NDC
Issue Type:           Improvement
Affects Versions:     2.0.0-alpha4
Assignee:             SLF4J developers list
Components:           slf4j-ext
Created:              09/Sep/21 5:30 AM
Labels:               logging nested
Priority:             Minor
Reporter:             Michael Wooten
Severity:             enhancement
Description:
  I have been working on a library of utilities related to using SLF4J in different environments, and one functionality that I cannot seem to replicate is the ability to test if a value is already in the Nested Diagnostic Context. The only exposed public methods of the org.slf4j.NDC class are push(String) and pop(). There is a size() method that is private.
  
   
  
  I would like to propose the inclusion of a "boolean contains(String)" method that would return whether the currently configured NDC already includes the provided value. I understand with the current approach this would involve iterating over the MDC similar to how size() does since the NDC is actually emulated with MDC keys.


==============================
 This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)



More information about the slf4j-dev mailing list