In my web process in a play 2/heroku app, I have this code:
LOG.info("=======1");
ConnectionFactory factory = new ConnectionFactory();
LOG.info("=======2");
factory.setUri(new URI(CLOUDAMQP_URL));
LOG.info("=======3");
Connection connection = factory.newConnection();
LOG.info("=======4");
channel = connection.createChannel();
LOG.info("=======5");
It produces the output:
2013-06-27T15:36:24.549110+00:00 app[web.1]: [info] c.e.g.m.MessagingBase - =======1
2013-06-27T15:36:24.575441+00:00 app[web.1]: [info] play - Application started (Prod)
2013-06-27T15:36:24.597986+00:00 app[web.1]: [info] c.e.g.m.MessagingBase - =======2
2013-06-27T15:36:24.598856+00:00 app[web.1]: [info] c.e.g.m.MessagingBase - =======3
In other words, I never see any output produced by this thread after newConnection() is called. Naturally, I thought an exception was being thrown or something, but, in fact, I've confirmed that the thread continues to run, it just stops logging. (For example, I can receive messages and I can call System.exit() ).
What is going on? How can I fix it?
Update: I forgot to mention, this is a scala project, with some java code (the amqp stuff is written in java), and the Loggers are created like this:
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
....
private static final Logger LOG = LoggerFactory.getLogger(WHATEVER.class);