I have a custom Autenticator in a Worklight hybrid project like this
public class MyCustomAuthenticator implements WorkLightAuthenticator{
private static final Logger logger = Logger.getLogger(MyCustomAuthenticator.class.getName());
private Map<String, Object> authenticationData = null;
public void init(Map<String, String> options) throws MissingConfigurationOptionException {
logger.info("MyCustomAuthenticator initialized");
}
...
}
But I don't see where does Worklight put those logger messages. Am I missing something?
In your server/conf folder look for the development.logging.properties file and uncomment the following properties:
com.worklight.level = FINE
java.util.logging.FileHandler.level = FINE
Then see if the logs appear in your development console.
Perhaps this new instructional video, "Logging and Debugging in Worklight Server", will help you to debug your Java code: http://www.youtube.com/watch?v=KmWBrCilt3Q
The shown in the video assumes you are using Worklight 6.0.
Also see:
Worklight 5.0.6.1 - System.out.println() logging from Worklight adapter is not working
In JavaScript you can use WL.Logger.
In Java you can use logger.info or logger.warning by importing java.util.logging.Logger.
logger.info / logger.warning will be printed to the Eclipse Worklight console.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With