Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Spring and the fly likes Log4J in Spring MVC application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Log4J in Spring MVC application" Watch "Log4J in Spring MVC application" New topic

Log4J in Spring MVC application

Pardeep Kapoor

Joined: Jul 05, 2011
Posts: 2

I didn't find any good material to wire the LOG4J in Spring MVC application.

Could anyone please guide or provide me some good stuff for it.

Thanks - Paddy !
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2904

I don't think it will be difficult to use log4j with Spring MVC. Have you tried adding log4j jar in app lib with log4j.xml in CLASSPATH.

[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Raja Pal
Ranch Hand

Joined: Jul 12, 2004
Posts: 92
Hi Paddy, If you are just trying to use automatic logging of the app, through appenders(log4j) that happens pretty well using log4j. The log4j documentation tells you how to plugit in for any web app. Any issues you have with spring in particular, you can ask...we do it in most of our apps - works well.

Java Pal - Your friend in technology and innovation...India.
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3900

Welcome to CodeRanch, Pardeep Kapoor!

[How to ask questions] [Twitter]
Pardeep Kapoor

Joined: Jul 05, 2011
Posts: 2
Vijitha Kumara wrote:Welcome to CodeRanch, Pardeep Kapoor!

Thanks !!!
It is sorta covered in the JavaRanch Style Guide.
subject: Log4J in Spring MVC application
It's not a secret anymore!