I have a code which throws exception and i can print the stack trace on the console and also in log file but i want it to be printed only on the log file and not on the console.
try
{
///some code here
}
catch(Exception e)
{
logger.error("Error", e.fillInStackTrace());
}
try block throws some exception and i am logging it in the log file i am using log4J.jar fie
i tried printing just the object of Exception but it doesn't print the entire stack trace help me out with this.