Namespace: OpenEdge.Logging
Type: Class MDC
Parent Classes:
Progress.Lang.Object

Inherits: Progress.Lang.Object


Copyright (c) 2018 by Progress Software Corporation. All rights reserved.
File:MDC
Purpose:Mapped Diagnostic Context object: A set of key/value pairs consumed by logger filters
Author(s):pjudge
Created:2018-11-19
Notes:- The context values can be tokenised via ${mdc.<context-key>} tokens
and are resolved by the OpenEdge.Logging.Format.MDCTokenFormat
format filter.



Method Summary
  Options Name Purpose
  Clear () /* Clear all entries in the MDC */
  CHARACTER Get (character) /* Get the context identified by the key parameter. @param character A non-empty key name @return character A value associated with the key */
  LOGICAL Has (character) /* Indicates whether a key exists in the store. @param character A non-empty key name @return logical TRUE if the key is in the context store; FALSE otherwise */
  LOGICAL IsEmpty () /* Indicates whether there is any contest in the store. @return logical Returns TRUE if there's at least one entry in the store */
  Put (character, character) /* Adds a context value to the MDC context @param character A non-empty key name @param character A value associated with the key */
  Remove (character) /* Remove the context identified by the key parameter. @param character A non-empty key name */

Constructor Summary
  Options Name Purpose
  MDC () /* Static constructor */
  MDC () /* Default constructor. PRIVATE since we never want this class instantiated. */

Method Detail
Top

Clear ()

/* Clear all entries in the MDC
Top

CHARACTER Get (character)

/* Get the context identified by the key parameter.
Parameters:
pKey CHARACTER
 
Returns CHARACTER
  character A value associated with the key
Top

LOGICAL Has (character)

/* Indicates whether a key exists in the store.
Parameters:
pKey CHARACTER
 
Returns LOGICAL
  logical TRUE if the key is in the context store; FALSE otherwise
Top

LOGICAL IsEmpty ()

/* Indicates whether there is any contest in the store.
Returns LOGICAL
  logical Returns TRUE if there's at least one entry in the store
Top

Put (character, character)

/* Adds a context value to the MDC context
Parameters:
pKey CHARACTER
 
pValue CHARACTER
 
Top

Remove (character)

/* Remove the context identified by the key parameter.
Parameters:
pKey CHARACTER
 


Constructor Detail
Top

STATIC MDC ()

/* Static constructor
Top

MDC ()

/* Default constructor.
PRIVATE since we never want this class instantiated.