the problem is the logging is not working inside the constructor (I mean, "server Object is created" is not been logged , while the logging statement in the other methods of class Server is logged). any ideas ?
I'm not sure about this one. logger may not really exist until the constructor finishes. (Usually we make class-level loggers a static variable.) If you really need it to be instance, just move the initialization into your constructor and then you should be fine. If you make it static, it will work as you currently expect.