Log To Console

The Log to Console option controls if the server writes the logging entries to the console. The property only has an effect when the server or instance is started in verbose mode.

Enable Logging To Console

To enable the Log to Console option you simply have to start the Server or Instance with the verbose option.

asadmin start domain --verbose

When the server or domain is not started in verbose mode, the java.util.ConsoleHandler will not be active for logging although it is defined as handler in the logging.properties file because there is no console attached with the process running the Payara server or Instance.

When in verbose mode, the log to Console option will also be active, regardless of the initial value in the logging.properties as otherwise, no log output would be visible on the console. Once started in verbose mode, you can use the Admin Console or the asadmin CLI to change the option.

Configure Logging To Console Using Admin Console

To configure Log to Console option using Admin Console:

Log to Console disabled

Configure Logging To Console Using Asadmin CLI

Use the following command to enable or disabled logging to the console:

asadmin> set-log-attributes com.sun.enterprise.server.logging.GFFileHandler.logtoConsole=false