novomind iAGENT uses the logging framework SLF4J. Your plugins may use the provided 'org.slf4j' packages.
Using Dependency Injection you can log statements inside your plugins with the provided logger. Simply let novomind iAGENT inject a SLF4J logger into your plugins.
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import org.slf4j.Logger;
import com.novomind.ecom.api.imail.core.CorePlugin;
import com.novomind.ecom.api.imail.core.TemplateMessageManipulator;
@CorePlugin
public class HelloWorldXHeaderIncoming implements TemplateMessageManipulator {
@Inject
private Logger log;
@PostConstruct
public void init() {
log.debug("init");
}
}
Your log statements are written to seperate log files, one log file for each process and plugin. The files are named '<process>.plugin.<plugin_id>.log'.