public class LoggingSimpleImpl implements Simple {
Logger logger = LoggerFactory.getLogger(LoggingSimpleImpl.class.getName());
public String hello(String message) {
if(System.getProperty("org.rioproject.serviceBeanExec")!=null) {
ServiceLogEventHandler handler = ServiceLogEventHandlerHelper.findInstance();
if(handler!=null) {
handler.addPublishableLogger(logger.getName());
handler.setPublishOnLevel("INFO");
logger.info("Set to INFO");
} else {
logger.error("Unable to obtain a ServiceLogEventHandler");
}
}