LOG4J2-589 Added logging, minor improvements. Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/9f76d5eb Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/9f76d5eb Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/9f76d5eb
Branch: refs/heads/master Commit: 9f76d5eba818269aa5474207519b9b4d9e2e6448 Parents: 5427dea Author: rpopma <[email protected]> Authored: Fri Sep 26 02:15:21 2014 +0900 Committer: rpopma <[email protected]> Committed: Fri Sep 26 02:17:58 2014 +0900 ---------------------------------------------------------------------- .../apache/logging/log4j/core/config/CustomLevelPlugin.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9f76d5eb/log4j-core/src/main/java/org/apache/logging/log4j/core/config/CustomLevelPlugin.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/CustomLevelPlugin.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/CustomLevelPlugin.java index ba0a260..532e811 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/CustomLevelPlugin.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/CustomLevelPlugin.java @@ -20,11 +20,12 @@ import org.apache.logging.log4j.Level; import org.apache.logging.log4j.core.config.plugins.Plugin; import org.apache.logging.log4j.core.config.plugins.PluginAttribute; import org.apache.logging.log4j.core.config.plugins.PluginFactory; +import org.apache.logging.log4j.status.StatusLogger; /** * Custom Level object that is created via configuration. */ -@Plugin(name = "CustomLevel", category = "Core") // TBD: category="Level" does not work... Why? +@Plugin(name = "CustomLevel", category = "Core", printObject = true) public final class CustomLevelPlugin { private CustomLevelPlugin() { @@ -38,11 +39,12 @@ public final class CustomLevelPlugin { * @return A Level object. */ @PluginFactory - public static Level createLevel( -// @formatter:off + public static Level createLevel(// @formatter:off @PluginAttribute("name") final String levelName, @PluginAttribute("intLevel") final int intLevel) { // @formatter:on + + StatusLogger.getLogger().debug("Creating CustomLevel(name='{}', intValue={})", levelName, intLevel); Level result = Level.forName(levelName, intLevel); return result; }
