1
votes

I have downloaded wso2 esb 5.0.0 into local but when I started it's starting with log level DEBUG. I would like t change the log level to ERROR by default when ever server started.

Looks like log level in registry will override log level in property files so is there a way to edit log level in registry or any other configuration file

1

1 Answers

1
votes

All WSO2 products uses a log4j based logging mechanism. Through log4j.properties file, <ESB_HOME>/repository/conf directory, this can be controlled.

WSO2 recommends to not to modify log4j.properties directly but rather through management console. The settings in the management console override the settings in log4j.properties.

For the respective loggers, check the log level and set it appropriately.

  • TRACE - Designates finer-grained informational events than the DEBUG.
  • DEBUG - Designates fine-grained informational events that are most useful to debug an application.
  • INFO - Designates informational messages that highlight the progress of the application at coarse-grained level.
  • WARN - Designates potentially harmful situations.
  • ERROR - Designates error events that might still allow the application to continue running.
  • FATAL - Designates very severe error events that will presumably lead the application to abort.

For the following loggers, change the log levels to ERROR.

log4j.category.org.apache.synapse=ERROR

log4j.category.org.apache.synapse.transport=ERROR

log4j.category.org.apache.axis2=ERROR

log4j.category.org.apache.axis2.transport=ERROR

log4j.logger.org.wso2=ERROR

log4j.logger.org.wso2.carbon=ERROR

log4j.appender.CARBON_LOGFILE.threshold=ERROR

log4j.appender.CARBON_MEMORY.threshold=ERROR

log4j.appender.CARBON_SYS_LOG.threshold=ERROR

log4j.appender.AUDIT_LOGFILE.threshold=ERROR

note: Even Important info statements like server startup will not be printed due to this change.

Refer the post for insights into tracking messages across different WSO2 components: http://muralitechblog.com/wso2-esb-how-to-track-messages/

https://docs.wso2.com/display/ESB490/Setting+Up+Logging