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

About the Author

author image
mkyong
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider make a donation to these charities.

Comments

Leave a Reply

avatar
newest oldest most voted
Pushpak
Guest
Pushpak

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

krish
Guest
krish

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

JTW
Guest
JTW

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