If the directory/file paths specified in this guide do not exist in your WSO2 product, see Directory Structure of WSO2 Products to locate the paths applicable to your product.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  • Configuring Carbon logs

    You can easily configure Carbon logs using the management console of your product, or you can manually edit the log4j.properties file. It is recommended to use use the management console to configure logging because all changes made to log4j through the management console persists in the WSO2 Registry. Therefore, those changes will be available after the server restarts and will get priority over what is defined in the log4jthe log4j.properties fileproperties file. Also, note that the logging configuration you define using the management console will apply at run time.    However, if you modify the log4j.properties file and restart the server, the earlier log4j configuration that persisted in the registry will be overwritten. There is also an option in the management console to restore the original log4j configuration from the  log4j.properties  file.   


    Identifying forged messages: From Carbon 4.4.3 onwards, it is possible to use a UUID in log messages so that any forged messages can be easily identified.  The UUID is logged using a new conversion character ‘K’ in the log pattern layout.  By default, the UUID will be generated every time the server starts. However, you can configure your server to generate the UUID more or less frequently, by specifying an exact time interval in the log4j.properties file.

    See the following topics for instructions:

  • Configuring Audit logs

    Audit logs are enabled in WSO2 products by default. You can change the following default configuration by manually updating the the log4j.properties file. 

    Code Block
    # Appender config to AUDIT_LOGFILE
    log4j.appender.AUDIT_LOGFILE.layout.ConversionPattern=[%d] %P%5p {%c}- %x %m %n
    log4j.appender.AUDIT_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
  • Configuring HTTP access logs

    See HTTP Access Logging for instructions on how to configure and use HTTP access logs.

  • Configuring Trace logs

    Trace logs are disabled by default in WSO2 products. To enable Trace logs, the preferred log4j appender should be configured with TRACE level as the threshold in the log4j.properties file. For example, if CARBON_LOGFILE is the log4j appender, the threshold level should be changed to TRACE as shown below. The default threshold is set to DEBUG.

    Code Block


  • Carbon logs (system logs and application logs) of a running Carbon instance can be monitoring using the management console.
  • Carbon logs, as well as HTTP access logs will be printed on the command terminal that open when you execute the product startup script.
  • Alternatively, all log files can be viewed from the <PRODUCT_HOME>/repository/logs folder. This folder contains Audit logs, HTTP access logs as well as the Carbon logs in separate log files with date stamps. Note that older Carbon logs are archived in the wso2carbon.log file.