Hi

  Thanks for reply.

   Actually i am using client side application here. So my requirment to
store all client side logs. So i can not do any thing with JBoss. Is there
not any way that i can store my client side logs to a log file? By using any
option in eclipse.

Thanks
Divya Garg










Matt Brown-20 wrote:
> 
> You'll need to configure Jboss to send system out someplace else; the use
> of a ConsoleAppender does not mean that log4j automatically or magically
> redirects any calls to System.out to someplace else. 
> 
> When you say "i am setting the Rolling appender as the root appender  then
> its child appender(Console Appender) message should also be stored in
> jbosswork1.log. Means all sysouts should come in  jbosswork1.log.", I
> think you are misunderstanding the purpose or the way that ConsoleAppender
> works. ConsoleAppender will simply append log messages to the console -
> wherever that happens to be (whether it is an actual console or redirected
> to a file).
> 
> -----Original Message-----
> From: div_gect [mailto:[email protected]] 
> Sent: Tuesday, April 21, 2009 10:24 AM
> To: [email protected]
> Subject: Client side logging
> 
> 
> Hi all
> 
>     Here i am executing a simple programme of log4j.
> 
> Here is programme-
> 
> import org.apache.log4j.Logger;
> import org.apache.log4j.xml.DOMConfigurator;
> 
> 
> public class first {
> 
> public static void main(String args[])
> 
> {
>       Logger logger=Logger.getLogger("first");
>    
>        DOMConfigurator.configure("c:\\log4j1.xml");
>       
>        System.out.println("This is  a sysout");       
>     logger.warn("Tsis is warning");
> }
> 
> }
> 
> 
> And here is log4j1.xml
> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration
> xmlns:log4j="http://jakarta.apache.org/log4j/";
> debug="true" >
> 
>    
> 
>     <appender name="ROLLING" class="org.apache.log4j.FileAppender">
>         
>         
>         <layout class="org.apache.log4j.PatternLayout">
>             
>          
>         </layout>
>    
>       
>  
>    
>     </appender>
> 
>     <appender name="CONSOLE1" class="org.apache.log4j.ConsoleAppender">
>        
>       
>       
>       <layout class="org.apache.log4j.PatternLayout">
>          
>          
>       </layout>
>    </appender>
>     
>     <category name="first">
>         <priority value="DEBUG"/>
>         <appender-ref ref="ROLLING"/>
>     </category>
> 
>     <category name="org.apache">
>         <priority value="WARN"/>
>     </category>
> 
>     <root>
>      
>         <appender-ref ref="ROLLING"/>
>     
>     </root>
> 
> </log4j:configuration>
> 
>       Now my issue is here as i am setting the Rolling appender as the
> root appender  then its child appender(Console Appender) message should
> also be stored in jbosswork1.log. Means all sysouts should come in 
> jbosswork1.log.
> While it is not happening ,only warn message is getting stored. Here i am
> using eclipse Gynamede.
>   
>     My requirment is to store all sysouts in log file.How can i perform
> it?
> Should i provide some VM parameter.?Any suggestions most welcome.
> 
> Thanks
> Divya Garg
> 
> 
> 
> 
> --
> View this message in context:
> http://www.nabble.com/Client-side-logging-tp23157248p23157248.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Client-side-logging-tp23157248p23158626.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to