Petals Logger Levels
Petals defines a specific level: MONIT.
MONIT level can be used by a log parser to monitor the exchange in Petals ESB.
The levels provided by Petals in descending order are:
- SEVERE (highest value)
- WARNING
- INFO
- CONFIG
- MONIT
- FINE
- FINER
- FINEST (lowest value)
The default root logger level is WARNING. It means that all classes log only SEVERE and WARNING information.
You can enable logging and specify a specific level for each module (container, component, cdk...). 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.
##Petals level Petals.level = FINEST #Handler Configuration java.util.logging.ConsoleHandler.level = FINEST
Example of configuration to debug (Level FINEST) petals-bc-soap component:
##Petals level Petals.level = INFO #Log level for all petals services Petals.Container.Components.petals-bc-soap.level = FINEST #Log level for petals-bc-soap component #Handler Configuration java.util.logging.ConsoleHandler.level = FINEST
Petals formatters
Petals provides two formatters: PetalsSimpleFormatter and PetalsExtendedFormatter.
PetalsSimpleFormatter uses the following pattern:
YYYY/MM/DD HH:MM:SS,FFF LOG LEVEL LOGGER NAME : ?[LOG MESSAGE]
[EXTRA DATA KEY] = '[EXTRA DATA VALUE]'
[JAVA EXCEPTION]
PetalsExtendedFormatter is used to log message content (payload XML of SOAP or JBI Message), attachments name and properties.
The pattern of PetalsExtendedFormatter inherits from the pattern of PetalsSimpleFormatter.
Example of logging output with PetalsSimpleFormatter:
2011/03/16 14:04:20,829 MONIT [Petals.Container.Components.petals-bc-soap] : External request received
client = '192.168.1.95'
processBranchId = '0'
processInstanceId = 'petals:uid:e871ffb0-4fcd-11e0-b428-00123feb3632'
processLoopId = '0'
requestedUrl = 'http://192.168.1.95:8080/petals/services/LoggerDemoService/'
traceCode = 'MON005'
Example of logging output with PetalsExtendedFormatter:
2011/03/16 15:57:33,798 MONIT [Petals.Container.Components.petals-bc-soap] : External request received
attachmentNames = ''
client = '192.168.1.95'
processBranchId = '0'
processInstanceId = 'petals:uid:b95be910-4fdd-11e0-b678-00123feb3632'
processLoopId = '0'
requestedUrl = 'http://192.168.1.95:8080/petals/services/LoggerDemoService/'
soapEnvelope = '<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:log="http://petals.ow2.org/bpel/LoggerDemo/"><soapenv:Body>
<log:LoggerDemoRequest>
<log:input>test</log:input>
</log:LoggerDemoRequest>
</soapenv:Body></soapenv:Envelope>'
traceCode = 'MON005'