Logging

You can capture and manage Chromium and Equo Chromium logs using Java Util Logging (JUL). This means you can control how logs are formatted, where they are printed to, and which severity level will be used to filter them; among many other configuration options available.

Enable logging

To enable logging, set this system property when launching your Java application:

-Dchromium.debug=true
This feature is available starting from version 128.0.12 and also in 116.0.29. In other versions, setting the chromium.debug system property causes logs to be handled internally by Equo Chromium and printed only to the console, without Java Util Logging support.

Configuring Java Util Logging

You can configure Java Util Logging by:

  • Setting a JUL configuration file

  • Setting a JUL configuration class

  • Programmatically configure your loggers in Java

Configuring JUL via a configuration file or class

To configure JUL by setting a configuration file or class, you must set one of the following system properties before creating any browser instance:

-Djava.util.logging.config.file=/path/to/your/custom-logging.properties
-Djava.util.logging.config.class=path/to/your/custom-logging.ConfigClass

Redirecting output to a file

To save Chromium and Equo Chromium logs to a file, set and configure a FileHandler in your logging configuration:

In a .properties file:

handlers=java.util.logging.FileHandler
java.util.logging.FileHandler.pattern=<PATH_TO_LOG_FILE>/<LOG_FILE_NAME>.log

Use a relative or absolute path for the log file.

There are several configuration options for the formatting of your log file’s name, as well as for the size limit, maximum amount of log files, whether logs will be appended to one single log file or have their own file each, and many others, all listed in the Java Util Logging Documentation.

By default, the Equo Chromium logs will be of level FINE, which is similar to a "debugging" level.

Accessing the logger for Equo Chromium in Java

import java.util.logging.Logger;
static final Logger logger = Logger.getLogger("com.equo.chromium");

Where this helps

  • Track browser rendering errors

  • Debug integration issues

  • Inspect browser crashes or loading problems