Logging

This guide describes how to configure Fuzio logging.

The root cause of many issues can be detected by analyzing Fuzio log messages.

If you see an issue or some unexpected behavior, please configure Fuzio to print all log messages to a file or System.err, reproduce the issue, and provide us with the collected log messages.

By default, Fuzio is configured to print all log messages with the ERROR level to System.err.

Levels 

Fuzio supports the following logging levels: DEBUG < INFO < WARNING < ERROR. By default, the library prints only messages with ERROR logging level, the rest is ignored.

Use OFF level to turn off logging completely, and ALL level to log all the messages.

You can change the default logging level via fuzio.logging.level system property or Fuzio Logging API.

Example: Setting Logging Level

Use the following system property to enable DEBUG logging:

-Dfuzio.logging.level=DEBUG

Or configure it in the code:

Java
Kotlin
System.setProperty("fuzio.logging.level", "DEBUG");
System.setProperty("fuzio.logging.level", "DEBUG")

Or use Fuzio Logging API:

Java
Kotlin
import tech.fuzio.logging.Level;
import tech.fuzio.logging.Logger;
...
Logger.level(Level.DEBUG);
import tech.fuzio.logging.Level
import tech.fuzio.logging.Logger
...
Logger.level(Level.DEBUG)

Logging to a file 

To print all log messages to a file please use the fuzio.logging.file system property.

Use the following system property to configure the log file path:

-Dfuzio.logging.file=fuzio.log

Or configure it in the code:

Java
Kotlin
System.setProperty("fuzio.logging.file", "fuzio.log");
System.setProperty("fuzio.logging.file", "fuzio.log")

The value of the property may be both an absolute or relative path to a file.

If the library can’t create a log file, it fallbacks to the default behavior and prints an error message with the exception stack trace to System.err.

Customer Support

QR code to follow us on WeChat

Technical Support

QR code to follow us on WeChat