hi ranchers ,
i am using Eclipse for creating
java project used for logging the events
i have placed the l
og4j.properties file manually inside the
src folder but when i run i get this with desired output
l
og4j:ERROR Could not read configuration file [log4j.properties].
java.io.FileNotFoundException: log4j.properties (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at java.io.FileInputStream.<init>(FileInputStream.java:79)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:372)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:403)
at com.MyLogger.main(MyLogger.java:25)
log4j:ERROR Ignoring configuration file [log4j.properties].
/* desired output
0 [main] WARN com.MyLogger - Sample warn message
0 [main] ERROR com.MyLogger - Sample error message
0 [main] FATAL com.MyLogger - Sample fatal message
*/
why it shows error message ?