Log4j 2 Tag Library
Tag setLogger

Sets the default Logger to use for the rest of this JSP's execution OR exports an org.apache.logging.log4j.Logger instance as the specified EL variable. The "value" attribute specifies either the String name of a Logger to create or an actual Logger instance. By default, Loggers are constructed and assigned the standard org.apache.logging.log4j.message.ParameterizedMessageFactory. The optional "factory" attribute can be used to override the default message factory.

<log:logger value="com.foo.bar" />
<log:logger value="com.bar.foo" var="myLogger" />
<log:debug message="This should log with com.foo.bar." />
<log:debug logger="${myLogger}" message="This should log with com.bar.foo." />

Tag Information
Tag Classorg.apache.logging.log4j.taglib.SetLoggerTag
TagExtraInfo ClassNone
Body Contentempty
Display NameNone

loggertruetruejava.lang.ObjectThe name or instance of the Logger to set as the JSP's default Logger or the name of the Logger to export as the specified EL variable.
factoryfalsetrueorg.apache.logging.log4j.message.MessageFactorySpecify this optional tag to provide a message factory other than the default ParameterizedMessageFactory message factory to use for the Logger. If the Logger has already been created with a different message factory, this will be ignored. Using this attribute makes no sense if the "value" attribute's value is an actual Logger instance, since its message factory cannot be changed.
varfalsefalsejava.lang.StringThe optional name of the EL variable to export this Logger as. Using this attribute makes no sense if the "value" attribute's value is an actual Logger instance. That would result in an existing Logger on the scope being re-added to the scope.
scopefalsefalsejava.lang.StringEither "page," "request," "session," or "application," the optional scope that the EL variable should be exported to (defaults to "page").

No Variables Defined.

Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.