Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0-beta4
-
None
Description
Custom Loggers that want to support configuration properties when creating custom LogEvent objects currently have no easy way to access these configuration Property objects.
The configuration Property map in LoggerConfig is private. Please provide an accessor method that returns a (read-only) view of this Property map.
proposal: add below method to org.apache.logging.log4j.core.config.LoggerConfig:
/**
- Returns an unmodifiable map with the configuration properties, or
- {@code null} if this {@code LoggerConfig} does not have any configuration
* properties.
* <p>
* For each {@code Property} key in the map, the value is {@code true} if
* the property value has a variable that needs to be substituted.
*
* @return an unmodifiable map with the configuration properties, or
* {@code null} - @see Configuration#getSubst()
- @see StrSubstitutor
*/
public Map<Property, Boolean> getProperties() {
return properties == null ? null :
Collections.unmodifiableMap(properties);
}
Attachments
Attachments
Issue Links
- is depended upon by
-
LOG4J2-151 Please facilitate subclassing Logger and LoggerContext (in org.apache.logging.log4j.core)
- Closed
-
LOG4J2-163 Create asynchronous Logger for low-latency logging
- Closed