This week's book giveaway is in the Programmer Certification forum. We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
If you do e.printStackTrace(), the stack trace of the exception will be written to the console window, not your Log4J log file. Log4J does not automatically log exceptions or catch whatever you write to the console window. In the catch-block, you will have to write the exception message to your Log4J logger yourself.