Logging
You can capture and manage Equo Chromium logs using Java Util Logging (JUL), starting
from version 128.0.12
, also available in version 116.0.29
.
In other versions, system property chromium.debug will just print the logs to the console.
|
Enable logging
To enable logging, set this system property when launching your Java application:
-Dchromium.debug=true
Configuring Java Util Logging (JUL)
You can configure JUL using: - A configuration file - A configuration class - Or programmatically in Java code
To configure via system properties:
-Djava.util.logging.config.file=your-logging.properties -Djava.util.logging.config.class=your.logging.ConfigClass
Access the logger for Equo Chromium in Java
import java.util.logging.Logger;
static final Logger logger = Logger.getLogger("com.equo.chromium");
Redirecting output to a file
To save Chromium logs to a file, configure a FileHandler in your logging 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; among a few others. All listed in the Java Util Logging documentation. |
For full knowledge on how to use JUL, please refer to the JUL Documentation.
By default, the Equo Chromium logs will be of level FINE
, which is similar to a "debugging" level.