|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (46)
View Page HistoryMoreover standard information of each log level, a MONIT level trace is accompanied by following information:
* a trace code identifying the nature of the MONIT trace. See below the list of trace code.
* a trace code identifying the nature of the MONIT trace. See below the list of trace code.
* a process flow instance identifier identifying the process flow instance,
* a process loop identifier identifying the loop instance in which the service provider is invoked,
* a process branch identifier identifying the branch instance in which the service provider is invoked,
* a process branch identifier identifying the branch instance in which the service provider is invoked,
* a flow step identifier identifying the consume or the provide invoked.
* specific information to the trace code.
* a text message explaining the event
* if the extended mode is enabled: the reference where the message content is stored. The content stored is defined accordingly to the trace code.
* if the extended mode is enabled: the reference where the message content is stored. The content stored is defined accordingly to the trace code.
|| Trace code \\ || Description || Specific information \\ || Message content stored \\ ||
| MON-001 consumeFlowStepBegin | A service associated to an internal endpoint receives an incoming request. First trace for a consumer. \\ | * the invoked interface name, or empty if not defined,
* the invoked service name, or empty if not defined,
* the invoked endpoint name, operation name. |
* the invoked operation name,
* the consumer endpoint name | * request XML payload
* message properties
* attachments |
| MON-002 | An endpoint invokes a service provider \\ | * the interface name to invoke, or empty if not defined,
* the service name to invoke, or empty if not defined,
* the endpoint name to invoke, or empty if not defined,
* the operation to invoke, or empty if not defined | * request XML payload
* message properties
* attachments |
| MON-003 | A service provider returns a reply to the caller \\ | * the consumer endpoint \\ | * reply XML payload, or fault or error,
* message properties
* attachments |
| MON-004 | A service consumer receives a reply from a service provider \\ | \- \\ | * reply XML payload, or fault or error,
* message properties
* attachments |
| MON-005 | A binding component receives an incoming request from outside \\ | * specific information defined at the component level to identify the outside client,
* specific information defined at the component level to identify the consume service unit | * message content stored defined at the component level |
| MON-006 | A binding component invokes an external service provider \\ | * specific information defined at the component level to identify the external service provider | * message content stored defined at the component level |
| MON-007 | A binding component receives a reply from an external service provider | \- \\ | * message content stored defined at the component level |
| MON-008 | A binding component returns a reply to an external service consumer \\ | \- \\ | * message content stored defined at the component level |
* the consumer endpoint name | * request XML payload
* message properties
* attachments |
| MON-002 | An endpoint invokes a service provider \\ | * the interface name to invoke, or empty if not defined,
* the service name to invoke, or empty if not defined,
* the endpoint name to invoke, or empty if not defined,
* the operation to invoke, or empty if not defined | * request XML payload
* message properties
* attachments |
| MON-003 | A service provider returns a reply to the caller \\ | * the consumer endpoint \\ | * reply XML payload, or fault or error,
* message properties
* attachments |
| MON-004 | A service consumer receives a reply from a service provider \\ | \- \\ | * reply XML payload, or fault or error,
* message properties
* attachments |
| MON-005 | A binding component receives an incoming request from outside \\ | * specific information defined at the component level to identify the outside client,
* specific information defined at the component level to identify the consume service unit | * message content stored defined at the component level |
| MON-006 | A binding component invokes an external service provider \\ | * specific information defined at the component level to identify the external service provider | * message content stored defined at the component level |
| MON-007 | A binding component receives a reply from an external service provider | \- \\ | * message content stored defined at the component level |
| MON-008 | A binding component returns a reply to an external service consumer \\ | \- \\ | * message content stored defined at the component level |
| provideFlowStepBegin | First trace for a service provider \\ | * its interface name
* its service name,
* its operation,
* its endpoint name. |
* its service name,
* its operation,
* its endpoint name. |
h2. Default levels
The default Petals root logger level is INFO. That's why all Petals components will log only SEVERE, WARNING and INFO information.
The default components level is MONIT.
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 = INFO #Log level for all petals services
Petals.level = INFO #Log level for all petals services
Petals.Container.Components.level = MONIT #log level for all components
Petals.Container.Components.petals-bc-soap.level = FINEST #Log level for petals-bc-soap component
h2. Petals formatters
Petals provides two formatters: PetalsSimpleFormatter and PetalsExtendedFormatter.
PetalsSimpleFormatter uses the following pattern:
{panel:borderStyle=solid}{+}Petals Node Name+ +YYYY/MM/DD+ +HH:MM:SS,FFF+ +LOG LEVEL+ +LOGGER NAME+ : ?\[LOG MESSAGE\]
\[EXTRA DATA KEY\] = '\[EXTRA DATA VALUE\]'
\[JAVA EXCEPTION\]{panel}
\[JAVA EXCEPTION\]{panel}
PetalsExtendedFormatter is used to log message content (payload XML of SOAP or JBI Message), attachment names and properties.
The pattern of PetalsExtendedFormatter inherits from the pattern of PetalsSimpleFormatter.
*Example of logging output with PetalsSimpleFormatter:*
{panel:borderStyle=solid}
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'
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'
node1 2011/08/25 15:44:44,426 GMT+0200 MONIT \[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}
*Example of logging output with PetalsExtendedFormatter:*
{panel:borderStyle=solid}
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'
{panel}
{builder-infopanel:The performance of Petals ESB is reduced when the PetalsExtendendFormatter is activate.}
{panel:borderStyle=solid}
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'
{panel}
{builder-infopanel:The performance of Petals ESB is reduced when the PetalsExtendendFormatter is activate.}
{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}
If following formatter is applied for both handlers:
{info}
If following formatter is applied for both handlers:
*java.util.logging.FileHandler.formatter = org.ow2.petals.commons.logger.PetalsSimpleFormatter*
*org.ow2.petals.kernel.logging.PetalsFileHandler.formatter = org.ow2.petals.kernel.logging.PetalsFormatter*
*java.util.logging.ConsoleHandler.formatter = org.ow2.petals.commons.logger.PetalsSimpleFormatter*
All logs are processed by the PetalsSimpleFormatter whether we are in _FINEST{_}_, SEVERE, CONFIG ... MONIT_, but
the both previous log traces are written if the level *MONIT* is precised.
h2. Splitting log files\\
Petals ESB allow to split its log records into a log files hierarchy. This is done thanks to the ContextualFileHandler PetalsFileHandler which can redirect log records to separate according to Petals ESB runtime properties.
In addition to standard Handler properties (level, formatter, etc..), ContextualFileHandler PetalsFileHandler can be configured through the following extra properties :
\* * basedir : base directory where log files will be stored. Default value (if no property set) is user home directory.
\* subdir : sub directory relative to basedir where log file will be stored. Default value (if no property set) is empty sub directory.
\* logFilename : log filename to use.
\* logFilename : log filename to use.
Both subdir and logFilename properties are dynamically evaluated each time a log record is written, and thus can use the following runtime properties :
In the base directory, you find petals.log file where petals container logs are recorded and a sub-directory flow-monitoring containing flowInstanceId sub-directories.
\* processInstanceId
\* componentName
h2. Logged informations
Following informations are +common{+}{+}s+ to both formatters:
Following informations are +common{+}{+}s+ to both formatters:
* Petals Node Name
* Timestamp
* Logger level
* Logger component name
* Log message
* Logger level
* Logger component name
* Log message
* Process branch identifier
* Process instance identifier
* Process loop identifier
* Trace code
* Process instance identifier
* Process loop identifier
* Trace code
We can found more informations about previous concepts in glossary [Glossary|http://doc.petalslink.com/display/glossary/Petals+ESB+specific+vocabulary]
After that, _Extended_ formatter allows to precise more detailed informations, as with SOAP component,
we can recover following additional informations:
* Requested URL
* Soap envelope content
* Attachment names
* Client IP adress
{tip:title=Multiple formatter utilizations}We can also use both formatter for different purposes
* If you don't want too much information in Petals console, we can keep the *"Simple"* formatter with following property:
java.util.logging.ConsoleHandler.formatter = org.ow2.petals.commons.logger.PetalsSimpleFormatter
* If you want more detailled informations accessible at all times prefer the *"Extended"* formatter in Petals log file with following property:
java.util.logging.FileHandler.formatter = org.ow2.petals.commons.logger.PetalsExtendedFormatter
{tip}
* If you don't want too much information in Petals console, we can keep the *"Simple"* formatter with following property:
java.util.logging.ConsoleHandler.formatter = org.ow2.petals.commons.logger.PetalsSimpleFormatter
* If you want more detailled informations accessible at all times prefer the *"Extended"* formatter in Petals log file with following property:
java.util.logging.FileHandler.formatter = org.ow2.petals.commons.logger.PetalsExtendedFormatter
{tip}
{warning:title=Environment variable}
Take in account if the following variable is define or not:
Take in account if the following variable is define or not:
# Initial developer(s): EBM WebSourcing
handlers=java.util.logging.ConsoleHandler, org.ow2.petals.kernel.logging.PetalsFileHandler
handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = org.ow2.petals.kernel.logging.PetalsFormatter
java.util.logging.ConsoleHandler.formatter = org.ow2.petals.kernel.logging.PetalsFormatter
java.util.logging.FileHandler.level = FINEST
java.util.logging.FileHandler.pattern = ${petals.home}/logs/petals.log
java.util.logging.FileHandler.formatter = org.ow2.petals.commons.logger.PetalsSimpleFormatter
java.util.logging.FileHandler.append = true
java.util.logging.FileHandler.pattern = ${petals.home}/logs/petals.log
java.util.logging.FileHandler.formatter = org.ow2.petals.commons.logger.PetalsSimpleFormatter
java.util.logging.FileHandler.append = true
org.ow2.petals.kernel.logging.PetalsFileHandler.level = MONIT
org.ow2.petals.kernel.logging.PetalsFileHandler.basedir = ${petals.home}/logs/
org.ow2.petals.kernel.logging.PetalsFileHandler.formatter = org.ow2.petals.kernel.logging.PetalsFormatter
org.ow2.petals.kernel.logging.PetalsFileHandler.basedir = ${petals.home}/logs/
org.ow2.petals.kernel.logging.PetalsFileHandler.formatter = org.ow2.petals.kernel.logging.PetalsFormatter
java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter = org.ow2.petals.commons.logger.PetalsSimpleFormatter
com.ebmwebsourcing.easycommons.logger.handler.ContextualFileHandler.level=FINEST
com.ebmwebsourcing.easycommons.logger.handler.ContextualFileHandler.basedir=${petals.home}/logs/
com.ebmwebsourcing.easycommons.logger.handler.ContextualFileHandler.subdir=${componentName}/${processInstanceId}
com.ebmwebsourcing.easycommons.logger.handler.ContextualFileHandler.logFilename=log
com.ebmwebsourcing.easycommons.logger.handler.ContextualFileHandler.formatter=com.ebmwebsourcing.easycommons.logger.LogDataFormatter
java.util.logging.ConsoleHandler.formatter = org.ow2.petals.commons.logger.PetalsSimpleFormatter
com.ebmwebsourcing.easycommons.logger.handler.ContextualFileHandler.level=FINEST
com.ebmwebsourcing.easycommons.logger.handler.ContextualFileHandler.basedir=${petals.home}/logs/
com.ebmwebsourcing.easycommons.logger.handler.ContextualFileHandler.subdir=${componentName}/${processInstanceId}
com.ebmwebsourcing.easycommons.logger.handler.ContextualFileHandler.logFilename=log
com.ebmwebsourcing.easycommons.logger.handler.ContextualFileHandler.formatter=com.ebmwebsourcing.easycommons.logger.LogDataFormatter
##Root level
.level = FINEST
.level = FINEST
Petals.level = FINEST
Petals.Container.Components.level = MONIT
#Petals.PetalsAdminService.level = FINEST
#Petals.AutoLoaderService.level = FINEST
#Petals.AutoLoaderService.level = FINEST
#Petals.Container.level = FINEST
#Petals.Container.ContainerService.level = FINEST
#Petals.Container.ContainerService.level = FINEST
#Petals.Container.Components.level = FINEST
#Petals.Container.Lifecycle.level = FINEST