This is memo.
We can see message in log.log, when protocol send/receive NekoMessage to/from other protocols. However, if some message extends NekoMessage then the send/receive log doesn't print into log. Because, the message is extended class from NekoMessage. The log mechanisms are working as (MAYBE) calling NekoMessage.getSource().
HOW TO PRINT LOG INTO "log.log"
One of the solutions is to call Logger.info().
This meaning is ....
#####BEGIN EXAMPLE###### (This is not completed code...... You need implements more for implementing protocols. )
Logger logger = new NekoLogger.getLogger(YourClassName.class.getName());
SenderInterface sender;
public void send(NekoMessage m)
{
logger.info("ANY MESSAGE " + m.getSource());
sender.send(m);
}
public void setSender(SenderInterface sender)
{
this.sender = sender;
}
###########END EXAMPLE###############
Comments