Hi team,
I copied an example of yours in the support forum comment below to try to get LOGGER output working in JForex client not just Eclipse:
https://www.fxmarketplace.ch/swiss/english/forex/jforex/forum/viewtopic.php?f=61&t=25597&view=unreadI run on OSX, so my compile code is the following (with my username replaced with "XXX" in the path):
import com.dukascopy.api.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@RequiresFullAccess
@Library("/Users/XXX/JForex/strategies/files/log4j-over-slf4j-1.6.4.jar:/Users/XXX/JForex/strategies/files/slf4j-api-1.6.4.jar")
public class LoggingTests implements IStrategy
{
public void onStart(IContext context) throws JFException
{
Logger logger = LoggerFactory.getLogger(LoggingTests.class);
logger.info("log test");
context.getConsole().getOut().println("println");
}
public void onTick(Instrument instrument, ITick tick) throws JFException {}
public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {}
public void onMessage(IMessage message) throws JFException {}
public void onAccount(IAccount account) throws JFException {}
public void onStop() throws JFException {}
}
I have downloaded version 1.6.4 of the SLF4J libraries and placed the files referenced in the correct locations, so the above code compiles correctly in JForex.
Unfortunately strategy this only outputs the println() not the logger.info(). I can not see the logger output in JForex at all - not in the Messages tab, not in the Historical Test tab when backtested nor in the strategy tab when running the strategy.
Please advise what I am doing wrong.
thanks,
C