Skip to main content

MEMO:NEKO:Logger

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

Popular posts from this blog

gDisk 0.6.1

Today, I try to use new gDisk version 0.6.1. Before version, I cannot see what files are on the server side. But current version I could do it. I think it is better than before version and it began to useful for backup software. But it has one problem.... When I uploaded more than 10 files at same time, it was clash down. I try to do it at 2-3 times but result was same..... I think it is one of the bag or the documents said about it (Actuary I read no document about it for this version)

Bicycle insurance in japan

Long time, I was considering about bicycle insurance. Many japanese are not consider about insurance for bicycle in japan. Because japan is weak country for insurance. Many people considered about when they are attacked by car. They didn't have an idea what they may be going to be individual at fault. However, road bikes are faster than my MTB. And, many of city bikes do not turn on a head light after sunset. The old person has also no idea what the bicycles can ride so fast as 50cc motar bike. Then they easy enter in front of bicycles. Such kind of accident is not few in japan. And, the worst case of such accident, the road bike rider needed to pay 40 millions yen to attacked person. Bicycle ride's bad manner have begun to social issues. Some bicycle riders do not follow the traffic lights or traffic signs. In such background, sometime, I have risks what I will be attacked by such bicycle riders when I ride my MTB. However, as above reason, many riders have no insurance

SSID in japanese?

Usually, we don't use japanese for setting to computer. Because, japaese needs at least two byte. Usually, many computer systems are designed for one byte. So, to use japanese in the system setting was not common way. If he is usual engineer then he will not set japanese for the setting to SSID. I was not do such a thing. Today, i read a tweet written by my friend. He wrote that he could see the japanese ssid from his house. I was really  suprized when i read it. So, I asked prof. Google about this ssid expression in japanese. So, it is  exist. Now, I had no wireless devces for trying it. But,it is so intersting thing for me.