How To Create Log4j.properties File
In previous program, i have used FileAppender. But if i would like to change my appender to JDBCAppender, i have to open my java file and do the modifications and need to recompile. We can avoid this by writing one .properties file.
By default the file name would be log4j.properties. This properties file stores data in the form of key, values pairs, in this file keys are fixed but values are our own. We can include all the log4j related properties into this file.
will see one example.
Sivateja Kandula [ Java/J2EE Developer & Web Designer ]
Founder of Java4s.com - Indian, lives in United States. You can contact me at email@example.com