Logging in PETALS

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (15)

View Page History

*Example of logging output with the Petals formatter:*
{panel:borderStyle=solid} {code}
sample-0 2013/03/07 10:31:31,084 GMT+0100 INFO [Petals.Communication.RMIConnector] : JMX RMI server started at : service:jmx:rmi:///jndi/rmi://localhost:7700/jmxRmiConnector
...
sample-0 2013/03/07 10:31:32,459 GMT+0100 MONIT \[Petals.Container.Components.petals-bc-soap\] [Petals.Container.Components.petals-bc-soap] : traceCode = 'consumeFlowStepBegin',flowInstanceId = '62cdea40-cf20-11e0-bdfa-000c29523cc7',flowStepId = '62ce3860-cf20-11e0-bdfa-000c29523cc7',flowInterfaceName = '\{[http://usecase1/bpel-P12/]}interfaceName1',flowServiceName = '\{[http://usecase1/bpel-P12/]}serviceName1',flowEndpointName = 'endpointName1',flowOperationName = '\{[http://usecase1/bpel-P12/]}process',client = '192.168.1.157',requestedURL = 'http://192.168.1.196:8084/petals/services/soap-C1'
{panel} {code}

{info:title=Default behavior}One or both previous formatters are always used during execution, unless default handler formatters in ../conf/logger.properties are changed
{info} {anchor:petals_file_handler}
If following formatter is applied for both handlers:
h2. Splitting log files

*org.ow2.petals.kernel.logging.PetalsFileHandler.formatter = org.ow2.petals.kernel.logging.PetalsFormatter*
*java.util.logging.ConsoleHandler.formatter = org.ow2.petals.commons.logger.PetalsFormatter*
Petals ESB allow to split its log records into a log files hierarchy. This is done thanks to the Petals file handler '{{org.ow2.petals.log.handler.PetalsFileHandler}}' which can redirect log records to separate files according to their nature:
* if the log record is generated into a process activity context, it is redirected in the log file dedicated to the process instance,
* otherwise, the log record is sent into the global log file.

All logs are processed by the PetalsFormatter whether we are in _FINEST{_}_, SEVERE, CONFIG ... MONIT_, but
The default files hierarchy is the following one:
* basedir
** petals.log: The global log file in which log records that are not generated into a process activity context are logged,
** flow-monitoring: Directory in which log files of log records associated to process activities are written,
*** <uid>: Directory of log files associated to the activities of only *ONE* process instance,
**** petals.log: The log file of process activities of only *ONE* process instance.

the both previous log traces are written if the level *MONIT* is precised.
In addition to the standard properties ({{level}} and {{formatter}}), the specific configuration properties of the Petals file handler are:
* {{basedir}}: The absolute root directory of the log file hierarchy. The default value is the value of the system property '{{petals.log.dir}}',
* {{flows-subdir}}: The name of the directory contained in the {{basedir}} where log files of log records associated to process activities are written. Default value: {{flow-monitoring}},
* {{logFilename}}: The name of log files. Default value: {{petals.log}}.

h2. Splitting log files\\

Petals ESB allow to split its log records into a log files hierarchy. This is done thanks to the PetalsFileHandler which can redirect log records to separate according to Petals ESB runtime properties.

In addition to standard Handler properties (level, formatter, etc..), PetalsFileHandler can be configured through the following extra properties: