Hello, SGS Community,
I’m experimenting with SGS, and have put together a boot GLO and am trying to make it work. Following the SworldWorld code for the most part. I can start up the server with my game, and I have a client which connects to the server fine. However, the problem I am having is that, even though the boot GLO is registering as a SimUserListener, I am not seeing my userJoined method being called when my client logs in.
I base this on the fact that I am using a java.util.logging.Logger in the boot GLO to log info to a file. I create the Logger in the boot() method, and store a reference to it in a member of the boot GLO. I have logging calls in both the boot() method and the userJoined() method. I see the logging from the boot() method in the log file, but I don’t see the logging from the userJoined() method.
The Logger class is not serializable, so I have to declare the ‘Logger logger’ boot GLO member transient. I was wondering if this works for persistent objects. If the Boot GLO is serialized to the Store and later de-serialized from the Store, then the transient member would be uninitialized. I suppose I really need to address this at some point, but I’m wondering right now if this is the source of the problem I have with the userJoined() method apparently not getting called. Maybe it is getting called, but the logging is not working because of serialization.
The real problem is gaining visibility into what the Server is doing. Does anybody have any advice on how to address the subject of logging in GLOs?
Thanks…BJN