Hi, 
   Any Body can please help me in this. I assume , i
am getting my server.log truncated because i am using
repository selector this way as shown in the below
code snippet, I am using JBOSS app server, 

what i thought may be is , since there are application
classloader and also JBOSS and Tomcat level
classloader ,it is getting into  the repository==null
loop for about 6 times and it is loading the 
LoadLog4Jconfig("log4j.xml",hierarchy); more than
once, is this causing the truncation of server LOG
file.

Any Ideas??


/** Initializing the CustomRepositorySelector.*/
        private void init() {   
                if (!initialized) {
                        ClassLoader loader =
Thread.currentThread().getContextClassLoader();                 
                        LoggerRepository repository =
repositories.get(loader);                       
                        if (repository == null) {
                                                                                
                
                                Hierarchy hierarchy = new Hierarchy(new
RootCategory(Level.DEBUG));                     
                                LoadLog4Jconfig("log4j.xml",hierarchy);
                        
repositories=CustomRepositorySelector.init(hierarchy);
                                                
                                initialized = true;                             
                        }
                }
        }


Thanks
Sreenivas

--- velagapudi sreenivas <[EMAIL PROTECTED]>
wrote:

> Hi,
>   I am using log4j for both application logs as well
> as server logs.For application logs i put the
> log4j.xml under WEB-INF/classes and for server logs
> i 
> am using Default log4j.xml which comes with the
> JBOSS
> application server . Now i am using the default
> configuration (log4j.xml) that comes with JBOSS
> application server.
> 
> But the problem is applications logs are creating
> fine, but my server.log is getting truncated and
> when
> i view the log file, some binary data is introduced
> into the log file.
> 
> If i change the configuration i.e make 
> <param name="Append" value="true"/>, which i am not
> supposed to do. It is working fine, if i use the
> default configuration, it is getting truncated.
> 
> Can anyone help me out.
> 
> Thanks
> Sreenivas
> 
> 
> 
> 
> 
>               
>
__________________________________________________________
> Yahoo! India Answers: Share what you know. Learn
> something new
> http://in.answers.yahoo.com/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



                
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

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

Reply via email to