Hi, I have a simple appfuse struts2 project and add the attached appender (default package), along with Log4j config:
<appender name="CONSOLE" class="TestAppender"/>
But whenever I log:
log.warn(new Integer(3));
log.warn(new ...MyObject("test"));
or any other Object, the appender is always getting a String:
logging message at warn: class
com.ibiodiversity.harvest.log.ParameterisedMessage
Tim [class java.lang.String]:
[EMAIL PROTECTED]
The appender only has:
@Override
protected void append(LoggingEvent event) {
System.out.println("Tim [" + event.getMessage().getClass() + "]: " +
event.getMessage());
}
Can anyone help with this at all please?
I have tried both Jetty and Tomcat but something somewhere is turning
Objects logged into Strings.
I have used Appenders like this in other Spring projects (never struts2)
with no worries, so am really baffled.
Thanks for any pointers,
Tim
TestAppender.java
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
