Then here's the first thing you should learn about servlets: The purpose of a servlet is to receive an HTTP request from a client, produce a response, and send it to that client.
So now think about it. Where does logging fit into that? If you were to write a "logging servlet", what HTTP requests would it be handling? And what about all of those other servlets, which are handling HTTP requests relating to your real business requirements? Wouldn't they get to do logging?
In other words: yes, logging needs to be done in the web application. But just because something needs to be done, that doesn't imply you have to create a servlet to do it. Not everything in a web application is a servlet. Just use log4j in the normal way, by putting logging code wherever it needs to be put.