log4j works by reading the logging level from log4j.properties. However normally we put the system in such a way that the log4j.properties is read while the application is loaded initially. There are at times, we need to make the logging in such a way that we can change the logging level dynamically. This is especially useful when we want to debug a running system in certain state and we can see more elaborate bahaviour by turning the log levels to more finer levels.
To do that, it's very easy.
Recent comments