logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Avdic <de...@betterway.net>
Subject Re: [NEWBIE] log4j setup problem?
Date Tue, 27 May 2003 19:31:09 GMT
Thanks a lot, you have been a great help!

Denis

Shapira, Yoav wrote:

>Howdy,
>You can put any path you want for the log file as the value of the
>RM.File property.  This can be an absolute path, or a path relative to
>the working directory.  You can also use environment variables here,
>e.g. to put your file in tomcat's log directory, use
>RM.File=$CATALINA_HOME/logs/rm.txt
>
>Struts uses jakarta commons-logging, which will in turn use log4j as its
>logging implementation if log4j is available.
>
>You can assign the RM appender for your logs only by associating with
>the top level of your packages, e.g. com.mycompany = DEBUG, RM instead
>of associating the RM appender with the root logger.  You can then
>associate a different appender (and level) for org.apache.struts or
>whatever the top-level package name is for struts.
>
>However, it's probably better to keep them in the same file and just
>specify the higher level (WARN for example) for struts, i.e. add
>log4j.logger.org.apache.struts = WARN to your configuration file.
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>  
>
>>-----Original Message-----
>>From: Denis Avdic [mailto:denis@betterway.net]
>>Sent: Tuesday, May 27, 2003 2:41 PM
>>To: Log4J Users List
>>Subject: Re: [NEWBIE] log4j setup problem?
>>
>>Agh.  How stupid do I feel?  The RM.log was in the tomcat/bin
>>    
>>
>directory,
>  
>
>>where catalina.sh is located.
>>
>>And, there is a LOT of logging in there though.  All the stuff from
>>Struts looks like it is using log4j and i am not sure why it is going
>>into my file.
>>Probably because I set it at root.
>>
>>Anyway, how would I separate my logs from the Struts logs (direct mine
>>in one file, i don't care about Struts logs)?
>>Also, how would I change the location of the log file?
>>
>>Denis
>>
>>    
>>
>>>log4j.debug=true to your java invocation.  This will make log4j
>>>output internal debugging information (such as "trying to create
>>>file...") to the console.
>>>
>>>Yoav Shapira
>>>Millennium ChemInformatics
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>-----Original Message-----
>>>>From: Denis Avdic [mailto:denis@betterway.net]
>>>>Sent: Tuesday, May 27, 2003 2:28 PM
>>>>To: Log4J Users List
>>>>Subject: Re: [NEWBIE] log4j setup problem?
>>>>
>>>>Hrm.
>>>>
>>>>Tomcat does have write access but the file is not created.  I just
>>>>deleted the file now, and ran the app again, and it is not creating
>>>>        
>>>>
>the
>  
>
>>>>file.
>>>>
>>>>Ideas?
>>>>
>>>>Shapira, Yoav wrote:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>Howdy,
>>>>>So you know it reads your file.  Is the log file created?  Does the
>>>>>
>>>>>
>>>>>          
>>>>>
>>>web
>>>
>>>
>>>      
>>>
>>>>>server user have write access to the directory (WEB-INF/classes) in
>>>>>which the log file needs to go?
>>>>>
>>>>>Yoav Shapira
>>>>>Millennium ChemInformatics
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>-----Original Message-----
>>>>>>From: Denis Avdic [mailto:denis@betterway.net]
>>>>>>Sent: Tuesday, May 27, 2003 2:18 PM
>>>>>>To: Log4J Users List
>>>>>>Subject: Re: [NEWBIE] log4j setup problem?
>>>>>>
>>>>>>If I change the path (by cutting out classes from the path, lets
>>>>>>            
>>>>>>
>say)
>  
>
>>>>>>            
>>>>>>
>>>I
>>>
>>>
>>>      
>>>
>>>>>>get this in my Catalina log:
>>>>>>
>>>>>>log4j:ERROR Could not read configuration file
>>>>>>[/home/denis/src/resumeweb/WEB-INF/RMLog4j.properties]
>>>>>>
>>>>>>If I have the classpath described below, then there is no error in
>>>>>>Catalina log;
>>>>>>
>>>>>>Shapira, Yoav wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>Howdy,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>I have a number of classes in my web app.  I instantiate my
>>>>>>>>                
>>>>>>>>
>logger
>  
>
>>>>>>>>                
>>>>>>>>
>>>in
>>>
>>>
>>>      
>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>>>my
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>init servlet with:
>>>>>>>>
>>>>>>>>PropertyConfigurator.configure(Constants.SITEPATH+"/WEB-
>>>>>>>>INF/classes/RMLog4j.properties");
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>>>Is the file indeed at this location?  Is it readable?  Do you
get
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>any
>>>
>>>
>>>      
>>>
>>>>>>>log4j errors in your console log (wherever System.out/System.err
>>>>>>>messages go in your server setup)?
>>>>>>>
>>>>>>>Yoav Shapira
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>This e-mail, including any attachments, is a confidential business
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>communication, and may contain information that is confidential,
>>>>>>proprietary and/or privileged.  This e-mail is intended only for
>>>>>>            
>>>>>>
>the
>  
>
>>>>>>individual(s) to whom it is addressed, and may not be saved,
>>>>>>            
>>>>>>
>copied,
>  
>
>>>>>>printed, disclosed or used by anyone else.  If you are not the(an)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>intended
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>recipient, please immediately delete this e-mail from your computer
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>system
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>and notify the sender.  Thank you.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>------------------------------------------------------------------
>>>>>>>              
>>>>>>>
>--
>  
>
>>>>>>>              
>>>>>>>
>>>-
>>>
>>>
>>>      
>>>
>>>>>>>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>>>>>>For additional commands, e-mail:
>>>>>>>              
>>>>>>>
>log4j-user-help@jakarta.apache.org
>  
>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>-------------------------------------------------------------------
>>>>>>            
>>>>>>
>--
>  
>
>>>>>>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>>>>>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>This e-mail, including any attachments, is a confidential business
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>communication, and may contain information that is confidential,
>>>>proprietary and/or privileged.  This e-mail is intended only for the
>>>>individual(s) to whom it is addressed, and may not be saved, copied,
>>>>printed, disclosed or used by anyone else.  If you are not the(an)
>>>>
>>>>
>>>>        
>>>>
>>>intended
>>>
>>>
>>>      
>>>
>>>>recipient, please immediately delete this e-mail from your computer
>>>>
>>>>
>>>>        
>>>>
>>>system
>>>
>>>
>>>      
>>>
>>>>and notify the sender.  Thank you.
>>>>
>>>>
>>>>        
>>>>
>>>>>--------------------------------------------------------------------
>>>>>          
>>>>>
>-
>  
>
>>>>>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>>>>
>>>>
>>>>        
>>>>
>>>
>>>
>>>This e-mail, including any attachments, is a confidential business
>>>      
>>>
>>communication, and may contain information that is confidential,
>>proprietary and/or privileged.  This e-mail is intended only for the
>>individual(s) to whom it is addressed, and may not be saved, copied,
>>printed, disclosed or used by anyone else.  If you are not the(an)
>>    
>>
>intended
>  
>
>>recipient, please immediately delete this e-mail from your computer
>>    
>>
>system
>  
>
>>and notify the sender.  Thank you.
>>    
>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>
>>>
>>>      
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>>    
>>
>
>
>
>
>This e-mail, including any attachments, is a confidential business communication, and
may contain information that is confidential, proprietary and/or privileged.  This e-mail
is intended only for the individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the sender.  Thank you.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message