I am not able to call the debug method. eclips says "'Cannot be resolved or is not a field' | Selenium Forum
K
Kapil Kuriakose Posted on 20/10/2019

steps:-

added jar "log4j 1.2.14.jr"

inserted: log4j.properties -->  updated the file path.

created a new class in the same package where the property file resides.

Logger test=Logger.getLogger("devpinoyLogger");
test.debug -------> debug shows error.

please help.

 


A
Ashish Thakur Replied on 21/10/2019

Are all jars imported as shown in the video?

If not please include all jars first. 

Also make sure that you are importing the same version only.


K
Kapil Kuriakose Replied on 21/10/2019

for Log4J, I have imported the same jar that you have mentioned in your video. 


K
Kapil Kuriakose Replied on 21/10/2019

please help. 


K
Kapil Kuriakose Replied on 21/10/2019

I have just opened your code (Module 7 from Downloads) in eclips and it is also NOT showing up "debug" method. please check. I am struck


K
Kapil Kuriakose Replied on 21/10/2019

I am getting below error message at run time. please tell me why?

log4j:WARN No appenders could be found for logger (devpinoyLogger).
log4j:WARN Please initialize the log4j system properly.


A
Ashish Thakur Replied on 22/10/2019

You might be missing the properties file.

Please include this in the project and then try again.