Page 1 of 1

Extension Event Handler does not print out any messages

Posted: 19 Sep 2024, 11:53
by einfachBlu

Code: Select all

@Singleton
public class LoginEventHandler extends BaseServerEventHandler {

  @Inject private Injector injector;

  @Override
  public void handleServerEvent(ISFSEvent e) throws SFSException {
      System.out.println("LoginEventHandler.handleServerEvent debug");
  }
}


The message is not printed. I also tried the getLogger(), the Logger from the main class and even printing out exceptions ex.printStackTrace(). Nothing is visible in my console.

What is visible, is the normal System.out.println() call in the init method, but somehow not in the event handler. The event handler itself is working because it throws an exception on the client side, if i throw it there. with:

var errorData = new SFSErrorData(SFSErrorCode.LOGIN_BAD_PASSWORD);
throw new SFSLoginException("wrong password", errorData);

So: What is the issue there

Re: Extension Event Handler does not print out any messages

Posted: 19 Sep 2024, 14:37
by Lapo
Hi,
you need to activate the "User Custom Login" flag on your zone. By default it is turned off.

AdminTool > Zone Configurator
Cheers