public class Interpolator extends AbstractConfigurationAwareLookup
StrLookup
s.Modifier and Type | Field and Description |
---|---|
static char |
PREFIX_SEPARATOR
Constant for the prefix separator.
|
configuration
Constructor and Description |
---|
Interpolator()
Create the default Interpolator using only Lookups that work without an event.
|
Interpolator(Map<String,String> properties)
Creates the Interpolator using only Lookups that work without an event and initial properties.
|
Interpolator(StrLookup defaultLookup) |
Interpolator(StrLookup defaultLookup,
List<String> pluginPackages)
Constructs an Interpolator using a given StrLookup and a list of packages to find Lookup plugins in.
|
Modifier and Type | Method and Description |
---|---|
Map<String,StrLookup> |
getStrLookupMap() |
String |
lookup(LogEvent event,
String var)
Resolves the specified variable.
|
String |
toString() |
setConfiguration
lookup
public static final char PREFIX_SEPARATOR
public Interpolator(StrLookup defaultLookup)
public Interpolator(StrLookup defaultLookup, List<String> pluginPackages)
defaultLookup
- the default StrLookup to use as a fallbackpluginPackages
- a list of packages to scan for Lookup pluginspublic Interpolator()
public Interpolator(Map<String,String> properties)
public Map<String,StrLookup> getStrLookupMap()
public String lookup(LogEvent event, String var)
event
- The current LogEvent or null.var
- the name of the variable whose value is to be looked upCopyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.