Log4j Tutorial

log4j logo

Apache log4j, a classic logging tool in Java. Below are a series of Log4j 1.2 tutorials :

Log4j Tutorials

References

  1. Log4j 1.2 Official Page
  2. Wikipedia : Log4j

3 comments on “Log4j Tutorial

  1. Hi Guys,

    I need help on log4j integration. I have integrated it with my testng automation framework. It is logging the errors which i have handled and logged. But I want to print the stacktrace for the errors like if Assert fails or exceptions like that.

    Thanks,
    Pushpak

    Reply
  2. how to get colored logs, I have been trying this for few days but no luck, could you plz.

    Reply
    1. Log4J will give you flat text output. Colouring is provided by some log viewing tools, not the logging framework.

      Reply

Leave a Comment

Your email address will not be published. Required fields are marked *