import java.util.List;
 import java.util.concurrent.TimeUnit;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import com.att.nsa.cmdtool.Command;
 import com.att.nsa.cmdtool.CommandNotReadyException;
 import com.att.nsa.mr.client.MRBatchingPublisher;
 
 public class MessageCommand implements Command<MRCommandContext>
 {
-
+        final Logger logger = LoggerFactory.getLogger(ApiKeyCommand.class);
        @Override
        public String[] getMatches ()
        {
                        catch ( Exception e )
                        {
                                out.println ( "Problem fetching messages: " + e.getMessage() );
+                            logger.error("Problem fetching messages: ", e);
                        }
                        finally
                        {
                        catch ( IOException e )
                        {
                                out.println ( "Problem sending message: " + e.getMessage() );
+                            logger.error("Problem sending message: ", e);
                        }
                        finally
                        {
                                catch ( IOException e )
                                {
                                        out.println ( "Problem sending message: " + e.getMessage() );
+                                    logger.error("Problem sending message: ", e);
                                }
                                catch ( InterruptedException e )
                                {
                                        out.println ( "Problem sending message: " + e.getMessage() );
+                                    logger.error("Problem sending message: ", e);
                                }
                                if ( left != null && left.size () > 0 )
                                {