Announcement Announcement Module
Collapse
No announcement yet.
Spring BlazeDS Integration version 1.5.0 can not logging with slf4j Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring BlazeDS Integration version 1.5.0 can not logging with slf4j

    I use Spring BlazeDS Integration version 1.5.0 and BlazeDS version 4.0.0. I found that it could not logging with SLF4J component. So, i found same solutions from internet, as follows:
    package com.omm;

    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    import flex.messaging.log.AbstractTarget;
    import flex.messaging.log.LogEvent;

    public class Slf4jTarget extends AbstractTarget
    {
    /** {@inheritDoc} */
    @Override
    public void logEvent(LogEvent event)
    {
    Logger logger = LoggerFactory.getLogger(event.logger.getCategory() );

    if (event.level >= LogEvent.ERROR)
    {
    logger.error(event.message, event.throwable);
    }
    else if (event.level >= LogEvent.WARN)
    {
    logger.warn(event.message, event.throwable);
    }
    else if (event.level >= LogEvent.INFO)
    {
    logger.info(event.message, event.throwable);
    }
    else if (event.level >= LogEvent.DEBUG)
    {
    logger.debug(event.message, event.throwable);
    }
    else
    {
    logger.trace(event.message, event.throwable);
    }
    }
    }

    Does Spring have the plane to resolve it ?
Working...
X