This documentation is for WSO2 Stream Processor 4.3.0. View documentation for the latest release.

All docs This doc
Skip to end of metadata
Go to start of metadata

This section explains how to enable logging at different levels for WSO2 SP. This is done by adding the required configurations in <SP_HOME>/conf<PROFILE>/log4j2.xml file.

    <Console name="CARBON_CONSOLE" target="SYSTEM_OUT">
        <PatternLayout pattern="[%d] %5p {%c} - %m%ex%n"/>
    <RollingFile name="CARBON_LOGFILE" fileName="${sys:carbon.home}/logs/carbon.log"
        <PatternLayout pattern="[%d] %5p {%c} - %m%ex%n"/>
    <Root level="info">
        <AppenderRef ref="CARBON_CONSOLE"/>
        <AppenderRef ref="CARBON_LOGFILE"/>

The above configuration contains the following elements:


The logs you enable can be printed in multiple destinations known as appenders. The following are the appenders that are currently supported.

  • Carbon Console
    Carbon console is the console in which WSO2 SP is run. 
  • Log file 


e.g., To enable debug logs on the org.wso2.carbon.kernel.runtime package, you can add the following entry to the log4j2.xml file.

<Logger name="org.wso2.carbon.kernel.runtime" level="debug"/>

Viewing logs

Logs are published to  the console. In addition, when you enable one or more logs for a specific profile, those logs are printed in the carbon.log file that is automatically created in the <SP_HOME>/wso2/<PROFILE>/log directory.

  • No labels