No, out of box BlazeDS does not support log4j or other frameworks directly.
However, it's really simple to add support for your favourite logging framework; I used the following to get the output into SLF4J:
package example;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import flex.messaging.log.AbstractTarget;
import flex.messaging.log.LogEvent;
public class Slf4jTarget extends AbstractTarget {
// log4j levels: OFF - FATAL - ERROR - WARN - INFO - DEBUG - TRACE - ALL
// blazeds levels: NONE - FATAL - ERROR - WARN - INFO - DEBUG - ALL
@Override
public void logEvent(LogEvent event) {
Logger log = LoggerFactory.getLogger(event.logger.getCategory());
if (event.level >= LogEvent.ERROR)
log.error(event.message, event.throwable);
else if (event.level >= LogEvent.WARN)
log.warn(event.message, event.throwable);
else if (event.level >= LogEvent.INFO)
log.info(event.message, event.throwable);
else if (event.level >= LogEvent.DEBUG)
log.debug(event.message, event.throwable);
else
log.trace(event.message, event.throwable);
}
}
.. and to use it, enable it in services-config.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<services-config>
<logging>
<target class="example.Slf4jTarget" level="Info">
</logging>
</services-config>