Logback: the reliable, generic, fast and flexible logging framework.
Copyright (C) 1999-2011, QOS.ch. All rights reserved.
This program and the accompanying materials are dual-licensed under
either the terms of the Eclipse Public License v1.0 as published by
the Eclipse Foundation
or (per the licensee's choosing)
under the terms of the GNU Lesser General Public License version 2.1
as published by the Free Software Foundation.
MDCBasedDiscriminator essentially returns the value mapped to an MDC key. If
the said value is null, then a default value is returned.
Both Key and the DefaultValue are user specified properties.
Return the value associated with an MDC entry designated by the Key
property. If that value is null, then return the value assigned to the
addError("The \"Key\" property must be set");
addError("The \"DefaultValue\" property must be set");
The default MDC value in case the MDC is not set for
For example, if
Key is set to the value
"someKey", and the MDC is not set for "someKey", then this appender will
use the default value, which you can set with the help of this method.