You don't have to configure a lot if you are using the standard configuration. All debug statements will appear in your server.log. All info statements will also appear on the console.
If you want to change logging level, add appenders and more use the file conf/log4j.xml in your server directory.
Oh, in your code you can instanciate a log4j Logger (use the factory method within the Logger class) and use this for logging.