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
directory,-----Original Message----- From: Denis Avdic [mailto:[EMAIL PROTECTED] 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
where catalina.sh is located.the
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:[EMAIL PROTECTED] 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
say)file.web
Ideas?
Shapira, Yoav wrote:
Howdy, So you know it reads your file. Is the log file created? Does the
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:[EMAIL PROTECTED] 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
loggerI
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
thein
anymy
init servlet with:Is the file indeed at this location? Is it readable? Do you get
PropertyConfigurator.configure(Constants.SITEPATH+"/WEB- INF/classes/RMLog4j.properties");
communication, and may contain information that is confidential,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
proprietary and/or privileged. This e-mail is intended only for
copied,individual(s) to whom it is addressed, and may not be saved,
--printed, disclosed or used by anyone else. If you are not the(an)intended
recipient, please immediately delete this e-mail from your computersystem
and notify the sender. Thank you.
------------------------------------------------------------------
[EMAIL PROTECTED]-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
---------------------------------------------------------------------
-intendedThis e-mail, including any attachments, is a confidential businessTo unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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)
recipient, please immediately delete this e-mail from your computersystem
and notify the sender. Thank you.
--------------------------------------------------------------------
intendedcommunication, and may contain information that is confidential,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]
This e-mail, including any attachments, is a confidential business
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)
recipient, please immediately delete this e-mail from your computersystem
and notify the sender. Thank you.
--------------------------------------------------------------------- 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]
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
