An Entry Example of Log4j

The log4j can be configured both programmatically and externally using special configuration files. External configuration is most preferred, because to take effect it doesn’t require change in application code, recompilation, or redeployment. Configuration files can be XML files or Java property files that can be created and edited using any text editor or XML editor, respectively.

Read more

How to use java properties file?

For configuration purposes, using properties file is a good way of reusing. In this way, when the code is packaged to a jar file, other users can just put the different configurations in the config.properties file. The following is a simple example of using properties file. 1. create the file hierarchy like the following. Mainly … Read more