4.2. Logging

4.2.1. General Configuration

(TODO)

4.2.2. Verbose Logging

Some log messages are disabled by default as they produce large amounts of output, and are only needed in special circumstances (typically, for debugging). This is called "verbose logging", and is controlled by the DebugSettings utility class. Typical usage is to initialize a final (static or non-static) field in the logging class with the returned setting, to only incur the configuration checking overhead once:

  • non-static field (preferred in most cases, as there is no risk of copying/pasting with the wrong class parameter): private final boolean verboseLogging = DebugSettings.getVerboseLoggingEnabled(getClass());

  • static field / constant (preferred for classes that are instantiated very frequently): private static final boolean VERBOSE_LOGGING = DebugSettings.getVerboseLoggingEnabled(TheClassName.class);

To control the verbose logging, set the rce.verboseLogging system property. Example: rce -p myProfile -vmargs -Drce.verboseLogging=*.NodePropertiesServiceImpl,*Workflow*. The syntax of the pattern is a comma-separated list of identifiers. A "*" wildcard matches any part of the class name, including the dot ("."). An empty string disables all verbose logging.

Note

As with any other JVM property, this parameter must be placed behind the -vmargs delimiter, which separates it from the "direct" RCE command-line arguments (like --headless or -p <profile>). This rule also applies when adding this parameter to an rce.ini file.

If this system property is not set, the DebugSettings.DEFAULT_VERBOSE_LOGGING_PATTERN constant's value is used. While developing in Eclipse, it can be useful to enter a verbose logging pattern there, as this affects all local RCE instances at once without editing multiple launch configurations. (As usual, it is your responsibility to make sure these local debug values are not commited into version control.)

Identifiers created before 8.1.0 were fully qualified Java class names; since 8.1.0, identifiers are arbitrary strings. For existing identifiers, these strings were set to the pre-8.1.0 FQNs. Over time, all existing identifiers are planned to be migrated to more intuitive strings.

The following table lists some identifiers that may be useful for debugging:

Table 4.1. Useful Verbose Logging Identifiers

IdentifierDescription
NetworkRequestsoutgoing and received network requests and responses, and possibly other related operations (e.g. conversions)