How to handle the printtracktrace messages in log4j | Selenium Forum
M
Posted on 21/11/2016
i want to see the print track trace messages in the log file using the cucumber frame work.right now iam able to publish the messages in log file ,but it's showing twice . how to handle this

my code is as below
try{
asser.asserequals("ABC","RTE");

}
Catch(Throwable T)
StringWriter sw= new StringWriter ();
t.printtracktrace(new Printwriter(sw));
tring stacktrace = sw.toString();
log.error(stacktrace.trim());

M
Replied on 23/11/2016

use log4j.