Display Logs for the Java Client
You can control the log levels for the Java client in the logging.properties file on your operating system. For example, for Java 8 (required) on Mac OS X, this file is located in: /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/jre/lib/logging.properties.
For more information, see Java Logging Overview. Ensure that you have write permissions to this file.
Before You Begin
This procedure is part of Checklist: Build Java WebSocket Clients.
Note: Learn about supported browsers, operating systems, and platform versions in the Release Notes.
To Enable the Java Client Logs
- Add the following line to the logging.properties file to display the complete log output:
com.kaazing.gateway.client.level = ALL
Note: The Java Logging API has a default logging configuration file located inside the JRE directory at JRE_DIRECTORY/lib/logging.properties. For example, on a Mac: /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/jre/lib/logging.properties.
Configure the ConsoleLogHandler to display all messages by changing the line:
java.util.logging.ConsoleHandler.level = INFO
to
java.util.logging.ConsoleHandler.level = ALL
- Save the logging.properties file.
- Enable logging in the Java Console or Java Preferences. To do so:
- In Windows, in the Java Control Panel, on the Advanced tab, choose Java console, then select Show console.
- On Mac OS X, for Java 8 (required), access the Java system preference in System Preferences, click Advanced, and under Debugging, click Enable logging. Then, under Java console, select Show console.
- Rebuild and start your client.
- Click Java and follow the instructions. The Java Console will open and display all logs from the Java Client.
Next Step
See Also
You have completed the Java client howtos. For more information on client API development, see the Java Client API.