Overview | Library | Tag | Help
| FRAMES NO FRAMES

## Log4j 2 Tag Library
Tag error

Equivalent of org.apache.logging.log4j.Logger#error(). This tag has dynamic attributes enabled. You may specify any number of arbitrary attributes whose values will be substituted in the String message. The "message" must be a String for this to work correctly. See the Log4j 2 manual for more information about message parameters and substitution. Only attribute values are used; attribute names are ignored.

Example:

    <log:error message="Log this message." />
    <log:error logger="com.foo.bar" message="${objectToLog}" exception="${exception}"
               marker="${marker}" />
    <log:error logger="com.foo.bar" exception="${exception}" marker="${marker}">
        Log this message
    </log:error>

Tag Information
Tag Class | org.apache.logging.log4j.taglib.ErrorTag
TagExtraInfo Class | None
Body Content | JSP
Display Name | None

Attributes
Name | Required | Request-time | Type | Description
logger | false | true | `java.lang.Object` | The name or instance of the Logger to use to override the default Logger for this JSP.
message | false | true | `java.lang.Object` | The message that should be logged. May be a String, Object, or org.apache.logging.log4j.message.Message. Either this attribute or body content are required.
marker | false | true | `org.apache.logging.log4j.Marker` | Optional marker data to include in this logging event.
exception | false | true | `java.lang.Throwable` | Optional exception that should be logged.

Variables
| No Variables Defined.

Overview | Library | Tag | Help
| FRAMES NO FRAMES

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.