Dynamically Change Mule Application Logging Level at Runtime

#ICYDK: Introduction

In many situations, we need to change the logging level from WARN to DEBUG and then change it back to WARN after a period of time. There are few ways to do so. Many inexperienced developers will change log4j2.xml file. For instance, if we want to log all the requests and responses for all HTTP Listener, we can change the log4j2.xml by adding the following lines:

This approach works, but it is often very changing if not impossible. To change code in the production environment should be considered a last resort. There are other ways such as command line or using web services.
However, all the above-mentioned approaches require more effort than the JMX approach, which is the simplest way in my humble opinion. This article will demonstrate how we can achieve this. https://goo.gl/MwVaSo #DataIntegration #ML

Subscribe To Newsletter

Sign up for my newsletter and get the latest technology news

2019 © Craig Brown PhD. All rights reserved.