Hi everybody, I'm new on the list, I'm french (excuse my poor english 
     ;) ), and I decided to subscribe because I have a serious problem with 
     taglibs mixed with log4j.
     
     I created a component wich is a mix between log4j and taglib;  so that 
     I can write in a JSP
     
     <log:debug category="mycat">debug message</log:debug>
     
     It runs well if the appender (=output) is the console; but I would 
     like the appender to be the browser.
     
     I red documentations and I don't think it is possible to add a 
     "jspAppender" in the log4j.properties file, but I succeed in adding a 
     jspAppender in my code.(In the same time I added a console appender in 
     the log4j.properties).
     In fact I had to retrieve the JspWriter of the JSP and simply add the 
     line
     
     JspWriter myJspWriter = pageContext.getOut(); 
     mylog.addAppender(myJspWriter);
     
     
     Here again it runs, BUT it runs only once !!
     
     Indeed, if in my JSP there are multiple log taglibs :
     
     <log:debug category="mycat">debug message</log:debug> <log:info 
     category="mycat">info  message</log:debug> <log:error 
     category="mycat">error message</log:debug>
     
     
     the browser only displays "debug message".
     
     But the concole displays the 3 messages.
     
     I thinks it acts as the JspWriter stream was closed or reinitialized 
     after the log4j object is destroyed or after the doEnfdTag() method 
     ends. But why ? and how to do differently ?
     
     
     Thanks for your answers.
     Guillaume


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to