Installing Apache log4j

When something goes wrong with your application in the field you will want all the help you can get to pin point the problem, or at least narrow it down.  One tool that can  help is a log file.  Log4J is a great library that makes adding logging to you code easy.  To download and use is simple

  • Open a browser and go to ‘logging.apache.org/log4j/1.2/
  • Click on the ‘download’ link
  • Select the installation package suitable for your machine
  • You are then presented with a list of download sites to select from.  As I am in the UK, I tend to go with UK sites but, you can select whichever you prefer.
  • Wait for the download to complete
  • Open the download package, locate the Java ARchive (JAR) file ‘log4j-1.2.17.jar’ and take a copy.
  • Go to the directory where Eclipse was installed; locate the subdirectory ‘plugins’ and copy the JAR file to this location. This will make it easier when we come to add these into our program.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.