It can be quite frustrating when you are faced with various errors. Logging helps you to get valuable insight that will help you identify the root cause of the errors. Thereby, logging will always help you to save time and effort. In addition, the logs will also be useful if you need help from the Apache Stratos community to help identify your problem.

The debug logs have been disabled in Apache Stratos by default for the purpose of maximizing performance.

The following are the various debug logs that can be enabled, which will help you to get more information when debugging: 

Command To Enable Log

DescriptionComponent Using The Log
log4j.logger.jclouds.compute=DEBUGThis log is used to print jclouds compute logs.Cloud Controller
log4j.logger.jclouds.headers=DEBUGThis log is used to print jclouds header logs.Cloud Controller
log4j.logger.jclouds.wire=DEBUG

This log is used to print jclouds wire logs.

Cloud Controller
log4j.logger.org.apache.stratos.autoscaler=DEBUGThis log is used to print debug logs for the Autoscaler component.AutoScaler
log4j.logger.org.apache.stratos.autoscaler.rule.RuleLog=DEBUGThis log is used to print Autoscaler debug rule logs.AutoScaler
log4j.logger.org.apache.stratos.cloud.controller=DEBUGThis log is used to print debug logs for Cloud Controller updates.Cloud Controller
log4j.logger.org.apache.stratos.cloud.controller.topology.TopologyManager=DEBUGThis log is used to print debug logs for topology updates.Cloud Controller
log4j.logger.org.apache.stratos.manager=DEBUGThis log is used to print debug logs for manager component.Stratos Manager
log4j.logger.org.apache.stratos.messaging=DEBUGThis log is used to print debug logs for the whole messaging component.All components

Accessing CEP debugging information

In WSO2 Complex Event Processor (CEP), you need to enable event tracing for the respective events via the Management Console. Thereafter, you will be able to view the log details via the event tracer.

When enabling event tracing logs and viewing log details, if you are using a single JVM setup, access the Stratos Management Console; however, if you are using a distributed setup, access the CEP Management Console.

Enabling event tracing

Enabling event tracing for execution plans

Follow the instructions below to enable event tracing for execution plans:

  1. Access the management console.
  2. Navigate to the Main tab and click Execution plans.
     
  3. Select the required execution plan and click Enable Tracing in the action column.
Enabling event tracing for input event adaptors

Follow the instructions below to enable event tracing for input event adaptors:

  1. Access the management console.
  2. Navigate to the Configure tab and click Input Event Adaptors.
  3. Select the required input event adaptor and click Enable Tracing in the action column.
Enabling event tracing for output event adaptors

Follow the instructions below to enable event tracing for output event adaptors:

  1. Access the management console.
  2. Navigate to the Configure tab and click Output Event Adaptors.
     
  3. Select the required output event adaptor and click Enable Tracing in the action column.
Enabling event tracing for event builders

Follow the instructions below to enable event tracing for event builders:

  1. Access the management console.
  2. Navigate to the Configure tab and click Event Builder.

  3. Select the required event builder and click Enable Tracing in the action column.
Enabling event tracing for event formatters

Follow the instructions below to enable event tracing for event formatters:

  1. Access the management console.
  2. Navigate to the Configure tab and click Event Formatter.
     
  3. Select the required event formatter and click Enable Tracing in the action column.

Viewing event details via the event tracer

Follow the instructions below to view event details in the event tracer:

  1. Access the management console.
  2. Navigate to the Monitor tab and click Event Tracer. The event tracer will display all the event details where event tracing has been enabled. 
     
  • No labels