What's your problem actually ? I tried to use Log4 in my project using struts as well and I didn't get any, I just out my 'log4j.properties' in the classpath and put some 'Category' variables in my code like this
 
public class ListBillerAction extends ActionBase {
   
  private static Category cat = Category.getInstance("Main.Biller"); 

  public ActionForward perform(ActionServlet servlet,
                               ActionMapping mapping,
                               ActionForm form,
                               HttpServletRequest request,
                               HttpServletResponse response) {
 
    ListBillerSearchCriteriaForm criteriaForm = (ListBillerSearchCriteriaForm) form;
    BillerSearcher billerSearcher;
    Screen dataScreen = null;
 
      if (buttonPressed(request, "search"))  {
        if (cat.isInfoEnabled())
         cat.info("!!!!!! Button Search has been pressed !!!!!!");
 
     ....
 
 
And it works great for me !
 
Hope it helps,
Thierry
 

Thierry Cools
 
Senior Java Developer
S1 Brussels
Kleine Kloosterstraat, 23
1932 st. Stevens-Woluwe
Belgium
Tel : +32 2 200 43 82
Email : [EMAIL PROTECTED]
----- Original Message -----
Sent: Tuesday, February 27, 2001 8:01 PM
Subject: Has any one used struts and log4j successfully?

Has anyone used log4j with struts? I have used log4j before, but I am new to
struts. So, I am just looking for a short cut. If you have,could you please
send me some code fragments to start off.

I would really appreciate it.

Cheers.....!
Sundar

Reply via email to