Logging in Petals ESB Registry

Logging systems

Petals ESB Registry uses the logging system provided by the JDK.

The logger configuration is determined according to the following ordered rules:

  1. the file defined as value of the property petals.registry.overlay.member.logging-cfg-file of the local node configuration, ie. member.properties,
  2. the file 'logging.properties' located in the same path than the local node configuration, ie. member.properties.
Contributors
No contributors found for: authors on selected page(s)

Petals Logging specificities

Default levels

The default root logger level is INFO. It means that all classes log only SEVERE, WARNING and INFO information.

You can enable logging and specify a specific level for each module. Here is how you would set debugging from Petals. You would need to ensure the Handler's level is also set to collect this threshold, so FINEST or ALL should be set.

## root logger level
.level = INFO

## Petals ESB Registry node level
Petals.Registry.Overlay.level = CONFIG

## Hazelcast level
com.hazelcast.level = WARNING

Petals formatter

The Petals formatter org.ow2.petals.log.formatter.LogDataFormatter is used for traces of the Petals ESB Registry node. The format of the logged message is :

YYYY/MM/DD HH:MM:SS,FFF GMT LOG LEVEL [LOGGER NAME] : LOG MESSAGE

Example of logging output with the Petals formatter:

2015/05/28 16:25:47,762 GMT+0200 INFO [Petals.Registry.Overlay] : Starting Petals Registry Overlay local member...
2015/05/28 16:25:47,856 GMT+0200 WARNING [Petals.Registry.Overlay] : No JMX user set. The default one will be used.
2015/05/28 16:25:47,856 GMT+0200 WARNING [Petals.Registry.Overlay] : No JMX password set. The default one will be used.
2015/05/28 16:25:47,932 GMT+0200 WARNING [com.hazelcast.instance.DefaultAddressPicker] : [LOCAL] [default-sample] [3.5-SNAPSHOT] Could not find a matching address to start with! Picking one of non-loopback addresses.
2015/05/28 16:25:48,450 GMT+0200 INFO [Petals.Registry.Overlay] : JMX server started at : service:jmx:rmi:///jndi/rmi://localhost:7750/jmxRmiConnector
2015/05/28 16:25:48,451 GMT+0200 INFO [Petals.Registry.Overlay] : Petals Registry Overlay local member started

Using your own log handler

Custom log handlers are supported. See the project source code of Petals providing log handlers to write your own.

Tuning your logging configuration

Petals ESB Registry node starts automatically on Debian-based system

If your Petals ESB Registry nodes used in production are:

  • installed on Debian-based systems through Debian packages,
  • and, running in automatic mode,

you can disable the log handler 'console' for which all generated traces on the standard output are discarded, and used only a log handler 'file' (java.util.logging.FileHandler, org.ow2.petals.log.handler.PetalsFileHandler according to your needs.

# Configuration of the log handlers
#####################################
#handlers=java.util.logging.ConsoleHandler, org.ow2.petals.log.handler.PetalsFileHandler
handlers=org.ow2.petals.log.handler.PetalsFileHandler

Petals ESB Registry node starts manually or installed through ZIP archive

If your Petals ESB Registry installation does not satisfy the previous criteria (not running in automatic mode on a Debian-based system), you can improve performance decreasing the level of the log handler 'console':

# Configuration of the handler ConsoleHandler
##################################################
java.util.logging.ConsoleHandler.level=INFO
java.util.logging.ConsoleHandler.formatter=org.ow2.petals.log.formatter.LogDataFormatter

You can also remove the log handler 'console' but it's disturbing because no more trace will be printed.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.