RE: duplicate logging?
Hi Paul, Based on the manual and what you said, this is what I did: I am logging events in 2 classes, viz. com.sap.A - with corresp. logger com.sap.A com.sap.B - with corresp. logger com.sap.B In the props file, I write: log4j.additivity.com.sap.A=false log4j.additivity.com.sap.B=false as in each case I want the logging to stop and not go higher up the heirarchy. Is this right? I still get the same result though.. one line all be itself and the other line following the pattern I specify.. thanks, Rishi --- Paul Smith [EMAIL PROTECTED] wrote: On Thu, 2003-08-28 at 06:32, Rishikesh Tembe wrote: Is this how its done? log4j.rootLogger.additivity=false Close, but no cigar. The Log Event starts getting logged at it's own Logger (say, the com.mycompony.mycomponent Logger, and gets logged up the hierarchy until it reaches the root Logger, so you need to set the addidivity at the Logger point where you wish to stop going up. So if you want the LogEvent to start and stop at it's own logger: log4j.additivity.com.mycompany.mycomponent=false (note that additivity is first) If you wish all com.mycompany and their children Log events to stop logging there log4j.additivity.com.mycompany=false Once it's reached the rootLogger, it can't go any higher, so your setting has no effect. The short manual has a good discussion on it: http://jakarta.apache.org/log4j/docs/manual.html (see the section on Appender additivity). cheers, Paul Smith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = Yahoo! India Promos: Win TVs, Bikes, DVD players more! Go to http://in.promos.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: duplicate logging?
On Fri, 2003-08-29 at 09:02, Rishikesh Tembe wrote: Hi Paul, Based on the manual and what you said, this is what I did: I am logging events in 2 classes, viz. com.sap.A - with corresp. logger com.sap.A com.sap.B - with corresp. logger com.sap.B In the props file, I write: log4j.additivity.com.sap.A=false log4j.additivity.com.sap.B=false as in each case I want the logging to stop and not go higher up the heirarchy. Is this right? I still get the same result though.. one line all be itself and the other line following the pattern I specify.. That looks right, could you paste your entire log4j.properties file in a reply so I can take a peek? I think it might be now an appender config issue. Could you also discuss with us where you actually want the results of each of those loggers to go, and if you could refresh my memory as to where they are actually going again that will help me a lot. cheers, Paul Smith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: duplicate logging?
-log4j.properties- log4j.rootLogger=INFO, d1 log4j.additivity.com.sap.EventThread=false log4j.appender.d1=org.apache.log4j.FileAppender log4j.appender.d1.File=threads.log log4j.appender.d1.layout=org.apache.log4j.PatternLayout log4j.appender.d1.layout.ConversionPattern=%d [%t] : %m%n -- Within com.sap.EventThread, I have foll. code snippets: { logger = Logger.getLogger(com.sap.EventThread); PatternLayout pattern = new PatternLayout(); FileAppender appender = null; try { appender = new FileAppender(pattern, threads.log, true); } catch(Exception e) { e.printStackTrace(); }; logger.addAppender(appender); logger.setLevel((Level)Level.INFO); The output of these logs goes to a threads.log file. For each call to logger.info(Some String), I get in threads.log the foll: Some String 2003-08-28 15:57:18,412 [1] : Some String and so on.. ** I do the same for the other class, com.sap.AINNode, which is running on another machine. I have a log4j.properties file with log4j.additivity.com.sap.AINNode=false and the output goes to a different file ain.log Here, for each call to logger.info(Some String), I get in ain.log for eg: Some String 2003-08-28 15:57:18,412 [1] : Some String Some String Some String 2003-08-28 15:57:18,412 [1] : Some String Some String Some String Some String 2003-08-28 15:57:18,412 [1] : Some String As you can see, the number of times it gets logged (without the date) increases by one for every subsequent call. ** That cover everything? -Rishi = Yahoo! India Promos: Win TVs, Bikes, DVD players more! Go to http://in.promos.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: duplicate logging?
On Fri, 2003-08-29 at 09:23, Rishikesh Tembe wrote: -log4j.properties- log4j.rootLogger=INFO, d1 log4j.additivity.com.sap.EventThread=false log4j.appender.d1=org.apache.log4j.FileAppender log4j.appender.d1.File=threads.log log4j.appender.d1.layout=org.apache.log4j.PatternLayout log4j.appender.d1.layout.ConversionPattern=%d [%t] : %m%n -- Within com.sap.EventThread, I have foll. code snippets: { logger = Logger.getLogger(com.sap.EventThread); PatternLayout pattern = new PatternLayout(); FileAppender appender = null; try { appender = new FileAppender(pattern, threads.log, true); } catch(Exception e) { e.printStackTrace(); }; logger.addAppender(appender); logger.setLevel((Level)Level.INFO); Thanks for this, it helps a lot. What you appear to be doing, if I make it out correctly, is creating a SECOND appender using Java code that is a complete duplicate (apart from the pattern). Is there any need? Is the appender specified in the configuration file ok to use? What I would recommend is: a) remove the Java code dealing with configuring appenders, I just can't see a good reason for it there (hard coding appenders is a maintainence nightmare). Leave it to the configuration file. b) the code logger = Logger.getLogger(com.sap.EventThread), make sure this is only called once! Best practice is to make the logger variable a private static final. the Logger.getLogger call is not exactly cheap, just get a reference as early as possible, and use it everywhere in your class. It's thread-safe, don't worry. c) You define the appenders in the configuration file, and you identify which Loggers the appenders get attached to. You will notice your config file: log4j.rootLogger=INFO, d1 This attaches the named appender 'd1' to the Root logger. I'd recommend removing this so it is just: log4j.rootLogger=INFO Now attach your d1 logger to your com.sap.EventThread logger like so: log4j.logger.com.sap.EventThread=INFO,d1 This should work a treat. Let me know how you go. cheers, Paul Smith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding more complete support for l7d and ResourceBundle
Hi, I am interested in internationalizing my logging messages and I see that I can use the l7dlog() methods on Logger to accomplish this. I am interested only in l7d at the source rather than at the destination so these methods are perfect (i.e. I don't need to do l7d in the appenders). Like several others on this list I would like to be able to easily configure the ResourceBundle that is associated with each Logger. I believe that I can accomplish this by creating a custom LoggerFactory. I want to explain my proposed approach and see if anyone has feedback on it. I will create a custom LoggerFactory that takes a single parameter - the desired Locale expressed as language code, country code, and variant. When the factory instantiates a new logger it will first call super() which will yield a new Logger object. I am planning to use the package structure to define my loggers and I will call ResourceBundle.getBundle(loggerName, locale) with the logger name and the supplied locale (or without the locale if none is provided). When I obtain the ResourceBundle I will assign it to the Logger using Logger.setResourceBundle(). If I get fancy I may search for a ResourceBundle higher up in the package structure if I don't find one specific to the class (i.e. first look for com.package.MyClass then com.package, then com). Does anyone have any comments or suggestions on this approach? Thanks, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: duplicate logging?
It did work a treat! thanks... That gave me better insight into log4j. Basically, we can - configure it programatically through the API - OR use the props file Right? And I was doing both, which was the source of the problem :) -Rishi = Yahoo! India Promos: Win TVs, Bikes, DVD players more! Go to http://in.promos.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: duplicate logging?
It did work a treat! thanks... That gave me better insight into log4j. Basically, we can - configure it programatically through the API - OR use the props file Right? Yes, although the property/xml files are the way to go. Just Log stuff in your Java code, and don't worry about where it's going. Then, later on, you can put on your Where should my log statements go hat and deal with what should be appended where/when in the configuration file. This separation makes Logging nice and clean. cheers, Paul Smith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Behaviour in Log4j when Logfile is deleted.
Hi all, I am using Lo4j 1.2.8, During the cource of my application running i deleted the log file. Now there is no exception/error thrown. The application keeps on running ,possibly ignoring the logging part. Whys is this behaviour happening,should the log4j throw exception as its no longer finding the Log File. Thanks and regards Rohith This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Behaviour in Log4j when Logfile is deleted.
log4j is fail stop. Logging doesn't and shouldn't throw an exception to your application and cause it to crash. -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 17:12 To: 'Log4J Users List' Subject: Behaviour in Log4j when Logfile is deleted. Hi all, I am using Lo4j 1.2.8, During the cource of my application running i deleted the log file. Now there is no exception/error thrown. The application keeps on running ,possibly ignoring the logging part. Whys is this behaviour happening,should the log4j throw exception as its no longer finding the Log File. Thanks and regards Rohith This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - 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]
RE: Behaviour in Log4j when Logfile is deleted.
whetrher logging activity is critcal for any application will be the guiding factor to decide whether the application should crash i case of logging failure. Morover what iam asking is should't a warning be thrown on the console saying that the logging cannot be proceeded or so -Original Message- From: Charles Hudak [mailto:[EMAIL PROTECTED] Sent: Friday, 29 August 2003 10:23 AM To: 'Log4J Users List' Subject: RE: Behaviour in Log4j when Logfile is deleted. log4j is fail stop. Logging doesn't and shouldn't throw an exception to your application and cause it to crash. -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 17:12 To: 'Log4J Users List' Subject: Behaviour in Log4j when Logfile is deleted. Hi all, I am using Lo4j 1.2.8, During the cource of my application running i deleted the log file. Now there is no exception/error thrown. The application keeps on running ,possibly ignoring the logging part. Whys is this behaviour happening,should the log4j throw exception as its no longer finding the Log File. Thanks and regards Rohith This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - 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 is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Class FileWatchdog
Hi i was looking at the Log4j API's There is a Abstract class : Class FileWatchdog has anyone used this ? can any one provide a brief idea abt this class plzz ? Thanks in Advance Rohith -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Friday, 29 August 2003 10:30 AM To: 'Log4J Users List' Subject: RE: Behaviour in Log4j when Logfile is deleted. whetrher logging activity is critcal for any application will be the guiding factor to decide whether the application should crash i case of logging failure. Morover what iam asking is should't a warning be thrown on the console saying that the logging cannot be proceeded or so -Original Message- From: Charles Hudak [mailto:[EMAIL PROTECTED] Sent: Friday, 29 August 2003 10:23 AM To: 'Log4J Users List' Subject: RE: Behaviour in Log4j when Logfile is deleted. log4j is fail stop. Logging doesn't and shouldn't throw an exception to your application and cause it to crash. -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 17:12 To: 'Log4J Users List' Subject: Behaviour in Log4j when Logfile is deleted. Hi all, I am using Lo4j 1.2.8, During the cource of my application running i deleted the log file. Now there is no exception/error thrown. The application keeps on running ,possibly ignoring the logging part. Whys is this behaviour happening,should the log4j throw exception as its no longer finding the Log File. Thanks and regards Rohith This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - 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 is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept
RE: Behaviour in Log4j when Logfile is deleted.
That may be YOUR guiding factor but it is NOT the common guiding factor. Log4j was designed to meet the large majority of needs, not your specific needs /soapbox. I do not want my web app to come crashing to a halt because someone accidentally deletes an active logfile or log4j is misconfigured. If this is your requirement, you are probably going to have to either: 1) Customize log4j to change it's failure mode 2) Implement customized logging where logging is part of the application and logging failure is as critical as an application failure. You can easily add a warning to the console if the log file is deleted but log4j doesn't continually throw warnings for a reason: it kills performance. -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 17:30 To: 'Log4J Users List' Subject: RE: Behaviour in Log4j when Logfile is deleted. whetrher logging activity is critcal for any application will be the guiding factor to decide whether the application should crash i case of logging failure. Morover what iam asking is should't a warning be thrown on the console saying that the logging cannot be proceeded or so -Original Message- From: Charles Hudak [mailto:[EMAIL PROTECTED] Sent: Friday, 29 August 2003 10:23 AM To: 'Log4J Users List' Subject: RE: Behaviour in Log4j when Logfile is deleted. log4j is fail stop. Logging doesn't and shouldn't throw an exception to your application and cause it to crash. -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 17:12 To: 'Log4J Users List' Subject: Behaviour in Log4j when Logfile is deleted. Hi all, I am using Lo4j 1.2.8, During the cource of my application running i deleted the log file. Now there is no exception/error thrown. The application keeps on running ,possibly ignoring the logging part. Whys is this behaviour happening,should the log4j throw exception as its no longer finding the Log File. Thanks and regards Rohith This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
RE: Log file location
Ceki and Jake..Thanks for the suggestions..I have used a separate appender for my package. I've defined a new appender in log4j.xml of JBoss as follows: appender name=myFileApp class=org.jboss.logging.appender.RollingFileAppender param name=File value=${jboss.server.home.dir}/log/myapp.log/ param name=Append value=false/ param name=MaxFileSize value=500KB/ param name=MaxBackupIndex value=1/ layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d %-5p [%c] %m%n/ /layout /appender And I have defined a category for my package as follows: category name=com.mypackage priority value=ERROR/ appender-ref ref=myFileApp/ /category where myFileApp is the appender that I have defined. This worked and I can see the log messages of my application in a separate file (myapp.log). Sriram -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 8:42 PM To: Log4J Users List Subject: RE: Log file location At 08:09 PM 8/28/2003 +0530, you wrote: I thought it would be a better idea to separate the application log with that of JBoss server log and so I am trying that out. But I wonder is there any way in which I can configure the following using JBoss's log4j.xml: - All server logs should be written to server.log - All Myapplication logs should be written to myapplication.log Basically log output should be directed to two files. Is this possible? Please inform. Of course. Configure a separate appender for your own application logging. Jake -Original Message- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 8:09 PM To: Log4J Users List Subject: RE: Log file location Sriram, We have not yet added the code to automatically read configuration files when a repository is first accessed. However, nothing prevents you from configuring a repository in your applications. As for using and installing JNDIRS, JBoss has very cool ways for installing plugins. You might want to write a plugin that installs JNDIRS (JNDI Repository Selector) through org.apache.log4j.LogManager's setRepositorySelector() method. All this might be somewhat complicated at the beginning. Why don't you just configure the log4j settings of JBoss? Wouldn't that be the easiest option? At 06:27 PM 8/28/2003 +0530, sriram wrote: Ceki, I'm trying the way you have mentioned at http://www.qos.ch/logging/sc.html (using LoggerRepository). In my java class, I have the following code: (I'm using JNDIRS you've mentioned in the above URL) private static final JNDIRS jndirs = new JNDIRS(); private static final LoggerRepository loggerRepository = jndirs.getLoggerRepository(); private static final Logger logger = loggerRepository.getLogger(MyApp.class.getName()); logger.warn(Just testing a log message with priority set to WARN); My log4j.properties file is as follows: appender writes to a file log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%-5p: %m%n log4j.appender.R.File=errors.log Still I feel that my log4j.properties file not being read, because I can't see errors.log created anywhere. And there are no errors throws. Any idea what could be the problem? Can you pl. suggest a solution? Sriram -Original Message- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 12:58 PM To: Log4J Users List Subject: RE: Log file location We should have a look at the jboss mailing lists. JBoss' class loader is called UnifiedClassLoader. The last time I look at UnifiedClassLoaders about a year ago, it seemed very smart. I'd have to look at the details again. At 02:05 AM 8/28/2003 -0500, Jacob Kjome wrote: Well, if you your app is seeing jboss/lib/log4j.jar in preference to WEB-INF/lib/log4j.jar, then there is a bug in JBoss. The Servlet spec states that (contrary to the normal Java2 classloading scheme) classes and libraries in WEB-INF/classes and WEB-INF/lib are checked first for classloading and if the classes are not found there, only then does it look to a higher classloader to attempt to load the classes. I know JBoss has some concept of a single classloader across the whole server (I think that is what I read), but if it doesn't allow for a separate WebappClassLoader, then I think it is a spec compliance violation. What does the JBoss group have to say about this? Putting log4j.jar in WEB-INF/lib *should* provide a completely separate logging environment from the one JBoss uses. Jake At 12:09 PM 8/28/2003 +0530, you wrote: Hi Jake, Thanks for the information. I have gone through the stuff you've written. Here's what I'm doing: 1. I placed log4j-1.2.8.jar in WEB-INF/lib 2. I placed log4j.properties in
RE: Problems with timestamp with Log4j and JVM 1.3 - seperate time calculation issue on HPUX
I ran some tests on my machine yesterday. I wrote a quick test program that did this: System.out.printlin(Timezone: + TimeZone.getDefault().getID()); System.out.printlin(Use DST : + TimeZone.getDefault().useDaylightTime()); I then set the timezone in the Windows Date/Time Properties dialog to GMT - Greenwich Mean Time. I ran the program twice, once with the Automatically ajust clock for daylight saving changed check box checked and once with it unchecked. With a 1.3.1, with or without the box checked, I get: Timezone: Europe/London Use DST : true With 1.4.1, with the box checked, I get Timezone: Europe/London Use DST : true With the box unchecked I get: Timezone: GMT Use DST : false So it appears that this is definitely broken on 1.3.1 on Windows :( -Original Message- From: Desai, Chetan P [ITS] [mailto:[EMAIL PROTECTED] Sent: August 25, 2003 12:52 PM To: Log4J Users List Subject: RE: Problems with timestamp with Log4j and JVM 1.3 - seperate time calculation issue on HPUX We ran into a special case where the JVM would not update the time if the OS synchronized time using NTP after the VM was started. We noticed the time diff. between JVM time in logs and unix time - the bypass was to use the following option: -XX:+UseGetTimeOfDay Note this was only on HPUX platform. -Chetan desai. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 1:39 PM To: Log4J Users List Subject: RE: Problems with timestamp with Log4j and JVM 1.3 Howdy, Have you seen this behavior with the automatically adjust for daylight savings time box unchecked? Do you have any suggestions how we can fix this? We cannot check the box because of the way our application handles timestamps. Do we have to write our own DailyRollingFileAppender? I haven't seen this behavior with the box unchecked, but that could be simply because I've always had that box checked ;) (Why wouldn't you?) 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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]
RE: Behaviour in Log4j when Logfile is deleted.
Log4j will never throw an exception through its printing methods (Logger.debug(), Logger.info(), ...). However, it will print a warning message on the console. That is the default behavior which can be customized using error handlers. It is entirely possible for the Java io API to silently ignore the fact that the file is gone. That is a Java issue and log4j cannot do anything about it. At 10:29 AM 8/29/2003 +1000, Raveendranath, Rohith (LNG - AUS) wrote: whetrher logging activity is critcal for any application will be the guiding factor to decide whether the application should crash i case of logging failure. Morover what iam asking is should't a warning be thrown on the console saying that the logging cannot be proceeded or so -- Ceki For log4j documentation consider The complete log4j manual ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Class FileWatchdog
Howdy, You use it all the time if you do configureAndWatch() for log4j. It has a concrete implementation as well, I think (PropertyWatchdog or something like that). The name of the class pretty much explains it: watch over a file and fire an event if the file changes. It's a common pattern with dozens of implementations all over the place. Yoav Shapira Millennium ChemInformatics -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 8:46 PM To: 'Log4J Users List' Subject: Class FileWatchdog Hi i was looking at the Log4j API's There is a Abstract class : Class FileWatchdog has anyone used this ? can any one provide a brief idea abt this class plzz ? Thanks in Advance Rohith -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Friday, 29 August 2003 10:30 AM To: 'Log4J Users List' Subject: RE: Behaviour in Log4j when Logfile is deleted. whetrher logging activity is critcal for any application will be the guiding factor to decide whether the application should crash i case of logging failure. Morover what iam asking is should't a warning be thrown on the console saying that the logging cannot be proceeded or so -Original Message- From: Charles Hudak [mailto:[EMAIL PROTECTED] Sent: Friday, 29 August 2003 10:23 AM To: 'Log4J Users List' Subject: RE: Behaviour in Log4j when Logfile is deleted. log4j is fail stop. Logging doesn't and shouldn't throw an exception to your application and cause it to crash. -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 17:12 To: 'Log4J Users List' Subject: Behaviour in Log4j when Logfile is deleted. Hi all, I am using Lo4j 1.2.8, During the cource of my application running i deleted the log file. Now there is no exception/error thrown. The application keeps on running ,possibly ignoring the logging part. Whys is this behaviour happening,should the log4j throw exception as its no longer finding the Log File. Thanks and regards Rohith This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To
RE: Class FileWatchdog
The watchdog code in log4j 1.2.x does not have a notion of a lifecycle. In particular, LogManager.shutdown does not stop the watchdog thread. Actually, I don't think there is a way to stop a watchdog thread which is definitely a serious shortcoming of log4j watchdogs. This omission can prevent dead classloaders from being garbage collected in web-containers. For example see: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22478 Thus, my recommendation would be to avoid using watchdogs for the time being in J2EE environments. At 08:59 AM 8/29/2003 -0400, Shapira, Yoav wrote: Howdy, You use it all the time if you do configureAndWatch() for log4j. It has a concrete implementation as well, I think (PropertyWatchdog or something like that). The name of the class pretty much explains it: watch over a file and fire an event if the file changes. It's a common pattern with dozens of implementations all over the place. Yoav Shapira Millennium ChemInformatics -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 8:46 PM To: 'Log4J Users List' Subject: Class FileWatchdog Hi i was looking at the Log4j API's There is a Abstract class : Class FileWatchdog has anyone used this ? can any one provide a brief idea abt this class plzz ? Thanks in Advance Rohith -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Friday, 29 August 2003 10:30 AM To: 'Log4J Users List' Subject: RE: Behaviour in Log4j when Logfile is deleted. whetrher logging activity is critcal for any application will be the guiding factor to decide whether the application should crash i case of logging failure. Morover what iam asking is should't a warning be thrown on the console saying that the logging cannot be proceeded or so -Original Message- From: Charles Hudak [mailto:[EMAIL PROTECTED] Sent: Friday, 29 August 2003 10:23 AM To: 'Log4J Users List' Subject: RE: Behaviour in Log4j when Logfile is deleted. log4j is fail stop. Logging doesn't and shouldn't throw an exception to your application and cause it to crash. -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 17:12 To: 'Log4J Users List' Subject: Behaviour in Log4j when Logfile is deleted. Hi all, I am using Lo4j 1.2.8, During the cource of my application running i deleted the log file. Now there is no exception/error thrown. The application keeps on running ,possibly ignoring the logging part. Whys is this behaviour happening,should the log4j throw exception as its no longer finding the Log File. Thanks and regards Rohith This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the
Re: Behaviour in Log4j when Logfile is deleted.
(I didn't see the original message, so forgive me if this is not relevent...) If you delete a file under Unix, the Java program will still have a handle to it and can't detect whether the file has been deleted externally. A workaround would be to reopen the file for every write, which would be dreadful for performance. On Fri, Aug 29, 2003 at 02:44:04PM +0200, Ceki G?lc? wrote: It is entirely possible for the Java io API to silently ignore the fact that the file is gone. That is a Java issue and log4j cannot do anything about it. At 10:29 AM 8/29/2003 +1000, Raveendranath, Rohith (LNG - AUS) wrote: whetrher logging activity is critcal for any application will be the guiding factor to decide whether the application should crash i case of logging failure. Morover what iam asking is should't a warning be thrown on the console saying that the logging cannot be proceeded or so -- Ceki For log4j documentation consider The complete log4j manual ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Fergus Gallagher Tel: +44 (20) 8742 1600 Orbis Fax: +44 (20) 8742 2649 414 Chiswick High Street email: [EMAIL PROTECTED] London W4 5TLWeb: http://www.orbisuk.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Behaviour in Log4j when Logfile is deleted.
Reopening the file? That is an interesting suggestion. Instead of reopening at each write, one could close and reopen the file every 10'000 writes or every 10 minutes which is ever comes first. At 02:07 PM 8/29/2003 +0100, you wrote: (I didn't see the original message, so forgive me if this is not relevent...) If you delete a file under Unix, the Java program will still have a handle to it and can't detect whether the file has been deleted externally. A workaround would be to reopen the file for every write, which would be dreadful for performance. -- Fergus Gallagher Tel: +44 (20) 8742 1600 -- Ceki For log4j documentation consider The complete log4j manual ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Behaviour in Log4j when Logfile is deleted.
Hi all, Thanks for the updates , a small doubt ,if i have the DOMConfigurator.configureAndWatch set then log4j reads the config file and will try to write the Log file( if its not present ) during the set duration isn't it. Regards Rohith -Original Message- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Friday, 29 August 2003 11:56 PM To: Log4J Users List Subject: Re: Behaviour in Log4j when Logfile is deleted. Reopening the file? That is an interesting suggestion. Instead of reopening at each write, one could close and reopen the file every 10'000 writes or every 10 minutes which is ever comes first. At 02:07 PM 8/29/2003 +0100, you wrote: (I didn't see the original message, so forgive me if this is not relevent...) If you delete a file under Unix, the Java program will still have a handle to it and can't detect whether the file has been deleted externally. A workaround would be to reopen the file for every write, which would be dreadful for performance. -- Fergus Gallagher Tel: +44 (20) 8742 1600 -- Ceki For log4j documentation consider The complete log4j manual ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how do I log an exception stacktrace
Hi, I apologize if this is a stupid question, but how would I log out an exception's stacktrace using logger.debug() ? Regards, Andreas Bothner Systems Integrator NOTE: This e-mail message is subject to the MTN Group disclaimer see http://www.mtn.co.za/email_disclaimer.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how do I log an exception stacktrace
Howdy, try { String a = null; System.out.println(a.length()); } catch (Exception e) { logger.error(Error printing string: , e); } Note the comma, i.e. the error(Object, Throwable) version of the API. All the levels (logger.info(...), logger.warn(...), etc) have a version of their signature with a Throwable argument. Yoav Shapira Millennium ChemInformatics -Original Message- From: Andreas Bothner [ MTN - Innovation Centre ] [mailto:[EMAIL PROTECTED] Sent: Friday, August 29, 2003 9:55 AM To: Log4J Users List Subject: how do I log an exception stacktrace Hi, I apologize if this is a stupid question, but how would I log out an exception's stacktrace using logger.debug() ? Regards, Andreas Bothner Systems Integrator NOTE: This e-mail message is subject to the MTN Group disclaimer see http://www.mtn.co.za/email_disclaimer.asp - 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]
RE: how do I log an exception stacktrace
... } catch( Exception e ) { logger.debug( e.getMessage(), e ); } ... -- Thomas | -Original Message- | From: Andreas Bothner [ MTN - Innovation Centre ] | [mailto:[EMAIL PROTECTED] | Sent: 29 August 2003 14:55 | To: Log4J Users List | Subject: how do I log an exception stacktrace | | | Hi, | | I apologize if this is a stupid question, but how would I log out an | exception's stacktrace using logger.debug() ? | | Regards, | Andreas Bothner | Systems Integrator | | | NOTE: This e-mail message is subject to the MTN Group disclaimer | see http://www.mtn.co.za/email_disclaimer.asp | | - | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | | * Copyright ERA Technology Ltd. 2003. (www.era.co.uk). All rights reserved. The information supplied in this Commercial Communication should be treated in confidence. No liability whatsoever is accepted for any loss or damage suffered as a result of accessing this message or any attachments. This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how do I log an exception stacktrace
Hi all, But doing like this will the stack trace be logged , this will log the error message as defined by that exception isnt it? Regards Rohith -Original Message- From: Thomas Muller [mailto:[EMAIL PROTECTED] Sent: Saturday, 30 August 2003 12:28 AM To: Log4J Users List Subject: RE: how do I log an exception stacktrace ... } catch( Exception e ) { logger.debug( e.getMessage(), e ); } ... -- Thomas | -Original Message- | From: Andreas Bothner [ MTN - Innovation Centre ] | [mailto:[EMAIL PROTECTED] | Sent: 29 August 2003 14:55 | To: Log4J Users List | Subject: how do I log an exception stacktrace | | | Hi, | | I apologize if this is a stupid question, but how would I log out an | exception's stacktrace using logger.debug() ? | | Regards, | Andreas Bothner | Systems Integrator | | | NOTE: This e-mail message is subject to the MTN Group disclaimer | see http://www.mtn.co.za/email_disclaimer.asp | | - | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | | * Copyright ERA Technology Ltd. 2003. (www.era.co.uk). All rights reserved. The information supplied in this Commercial Communication should be treated in confidence. No liability whatsoever is accepted for any loss or damage suffered as a result of accessing this message or any attachments. This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how do I log an exception stacktrace
In special circumstances you might want each line of the stacktrace to be full log lines (i.e., with loglevel, MDC, threadname, etc). In this case you can use Throwable.getStackTrace() to get the individual line, and then do something like public static void logError(Logger log, Throwable ex, int limit) { if (log.isDebugEnabled()) { StackTraceElement[] ste = ex.getStackTrace(); for (int i = 0; i ste.length; i++) { if (i == limit) { return; } if (i==0) { log.debug(ste[i]); } else { log.debug(\t + ste[i]); } } } } I use this when I need to see a stacktrace when I grep through the log file for a paricular thread, say. On Fri, Aug 29, 2003 at 10:28:54AM -0400, Shapira, Yoav wrote: Howdy, try { String a = null; System.out.println(a.length()); } catch (Exception e) { logger.error(Error printing string: , e); } Note the comma, i.e. the error(Object, Throwable) version of the API. All the levels (logger.info(...), logger.warn(...), etc) have a version of their signature with a Throwable argument. Yoav Shapira Millennium ChemInformatics -Original Message- From: Andreas Bothner [ MTN - Innovation Centre ] [mailto:[EMAIL PROTECTED] Sent: Friday, August 29, 2003 9:55 AM To: Log4J Users List Subject: how do I log an exception stacktrace Hi, I apologize if this is a stupid question, but how would I log out an exception's stacktrace using logger.debug() ? Regards, Andreas Bothner Systems Integrator NOTE: This e-mail message is subject to the MTN Group disclaimer see http://www.mtn.co.za/email_disclaimer.asp - 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] -- Fergus Gallagher Tel: +44 (20) 8742 1600 Orbis Fax: +44 (20) 8742 2649 414 Chiswick High Street email: [EMAIL PROTECTED] London W4 5TLWeb: http://www.orbisuk.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Log file location
Re: Bug in jBoss Alas. Actually/unfortunately the 2.3 (and 2.4 proposed final draft) Servlet spec only 'suggests' that the Containers ClassLoader give preference to the WebApp (http://www.jcp.org/aboutJava/communityprocess/final/jsr053/): SRV.9.7.2 Web Application Classloader ...It is recommended also that the application class loader be implemented so that classes and resources packaged within the WAR are loaded in preference to classes and resources residing in container-wide library JARs. Note the use of the word 'recommended' and not 'required' FWIW, I have always ended up punting on this one and placing my log4j configuration into the jBoss server's log4j.xml file. Perhaps jBoss 4.X has addressed this (I have not used it yet)? At 02:05 AM 8/28/2003 -0500, Jacob Kjome wrote: Well, if you your app is seeing jboss/lib/log4j.jar in preference to WEB-INF/lib/log4j.jar, then there is a bug in JBoss. The Servlet spec states that (contrary to the normal Java2 classloading scheme) classes and libraries in WEB-INF/classes and WEB-INF/lib are checked first for classloading and if the classes are not found there, only then does it look to a higher classloader to attempt to load the classes. I know JBoss has some concept of a single classloader across the whole server (I think that is what I read), but if it doesn't allow for a separate WebappClassLoader, then I think it is a spec compliance violation. What does the JBoss group have to say about this? Putting log4j.jar in WEB-INF/lib *should* provide a completely separate logging environment from the one JBoss uses. Jake At 12:09 PM 8/28/2003 +0530, you wrote: Hi Jake, Thanks for the information. I have gone through the stuff you've written. Here's what I'm doing: 1. I placed log4j-1.2.8.jar in WEB-INF/lib 2. I placed log4j.properties in WEB-INF/classes 3. I deployed the application on JBoss 3.2.1 By default, JBoss has log4j.jar in jboss/lib which is in my classpath. So, even my application class loader takes the classes from log4j.jar located in jboss/lib? If I remove log4j.jar in jboss/lib, then I think I will not get server log of JBoss. How to solve this issue? Please inform. Sriram -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 11:00 AM To: Log4J Users List Subject: RE: Log file location Hi Sriram, Do you have log4j.jar in WEB-INF/lib? If not, I'd expect default initialization not to work. Remember that the webapp class loader can see parent class loaders, but the parents cannot see the webapp class loader, hence your log4j.properties will definitely not be found. If you are trying to use log4j.jar in a parent class loader and want your own configuration file to be used in your own logging space, then you will need to use a repository selector. See the log4j-sandbox for working examples. I wrote something up about this stuff here... http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/AppContainerLogging Jake At 09:35 AM 8/28/2003 +0530, you wrote: The properties file is not being read at all I placed it in WEB-INF/classes. Still it's not being read. I am JBoss and JBoss contains log4j.jar by default and it has log4j.xml in default/conf folder. Probably even my application is taking log4j.xml from that location by default. I need to check that. Anyone who has implemented log4j for their applications on JBoss, pl. suggest. Sriram -Original Message- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 6:52 PM To: Log4J Users List Subject: Re: Log file location Is the properties file being read at all? At 06:25 PM 8/27/2003 +0530, sriram wrote: Hi, I am unable to set log file location. I searched the forum for old messages and found some. I tried the way it was mentioned in those messages, but still my problem is not solved. My log4j.properties file is as follows: log4j.rootCategory=WARN, dest1, R log4j.appender.dest1=org.apache.log4j.ConsoleAppender log4j.appender.dest1.layout=org.apache.log4j.PatternLayout log4j.appender.dest1.layout.ConversionPattern=%-5p: %m%n appender writes to a file log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%-5p: %m%n log4j.appender.R.File=d:/jboss/errors.log I packaged by application as .ear and deployed it on JBoss running on Win 2000. When I run the application, I can see the log messages on JBoss console, but these messages are not getting stored in the file I've specified (d:/jboss/errors.log). What could be the problem? In fact, initially I tried ${jboss.home}/errors.log, but it didn't work. So I thought of hard coding the file location and tried it out. Still the same problem. Can someone please suggest a solution? Thanks Sriram -- Ceki For log4j documentation consider The complete log4j manual
Fwd: Log4J400 - Appender for IBM AS/400 MessageQueue and DataQueue
Who can I contact to get this appender listed on Log4J homepage? Regards Gurkha Hello, I have written appenders for the AS/400 (aka IBM iSeries) MessageQueue and DataQueue. Due to dependencies, I cannot submit it to the Apache Log4J project. I have hosted the project on SourceForge. I request you to consider adding it to the the download page under the third party extensions section. The link to the Log4J400 website is http://log4j400.sourceforge.net/ Regards, Gurkha -- Ceki For log4j documentation consider The complete log4j manual ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Get MSN 8 and help protect your children with advanced parental controls. http://join.msn.com/?page=features/parental - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how do I log an exception stacktrace
Note that the StackTraceElement class requires j2se 1.4+. -Scott Heaberlin --- Fergus Gallagher [EMAIL PROTECTED] wrote: In special circumstances you might want each line of the stacktrace to be full log lines (i.e., with loglevel, MDC, threadname, etc). In this case you can use Throwable.getStackTrace() to get the individual line, and then do something like public static void logError(Logger log, Throwable ex, int limit) { if (log.isDebugEnabled()) { StackTraceElement[] ste = ex.getStackTrace(); for (int i = 0; i ste.length; i++) { if (i == limit) { return; } if (i==0) { log.debug(ste[i]); } else { log.debug(\t + ste[i]); } } } } I use this when I need to see a stacktrace when I grep through the log file for a paricular thread, say. = == Scott Heaberlin [EMAIL PROTECTED] [EMAIL PROTECTED] == __ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Class FileWatchdog
unsubscribe -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, August 29, 2003 5:59 AM To: Log4J Users List Subject: RE: Class FileWatchdog Howdy, You use it all the time if you do configureAndWatch() for log4j. It has a concrete implementation as well, I think (PropertyWatchdog or something like that). The name of the class pretty much explains it: watch over a file and fire an event if the file changes. It's a common pattern with dozens of implementations all over the place. Yoav Shapira Millennium ChemInformatics -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 8:46 PM To: 'Log4J Users List' Subject: Class FileWatchdog Hi i was looking at the Log4j API's There is a Abstract class : Class FileWatchdog has anyone used this ? can any one provide a brief idea abt this class plzz ? Thanks in Advance Rohith -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Friday, 29 August 2003 10:30 AM To: 'Log4J Users List' Subject: RE: Behaviour in Log4j when Logfile is deleted. whetrher logging activity is critcal for any application will be the guiding factor to decide whether the application should crash i case of logging failure. Morover what iam asking is should't a warning be thrown on the console saying that the logging cannot be proceeded or so -Original Message- From: Charles Hudak [mailto:[EMAIL PROTECTED] Sent: Friday, 29 August 2003 10:23 AM To: 'Log4J Users List' Subject: RE: Behaviour in Log4j when Logfile is deleted. log4j is fail stop. Logging doesn't and shouldn't throw an exception to your application and cause it to crash. -Original Message- From: Raveendranath, Rohith (LNG - AUS) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 17:12 To: 'Log4J Users List' Subject: Behaviour in Log4j when Logfile is deleted. Hi all, I am using Lo4j 1.2.8, During the cource of my application running i deleted the log file. Now there is no exception/error thrown. The application keeps on running ,possibly ignoring the logging part. Whys is this behaviour happening,should the log4j throw exception as its no longer finding the Log File. Thanks and regards Rohith This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this e-mail. We cannot accept liability for any loss or damage caused by software viruses.
RE: embedding chainsaw or logfactor5
I can speak for Chainsaw, as one of the developers of it, I'll defer to someone else with more LF5 experience to comment on it. Depends what you mean by embed? What did you have in mind? I want to have a JPanel inside my application with the chainsaw interface. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fwd: Log4J400 - Appender for IBM AS/400 MessageQueue and DataQueue
Thanks you sir! From: Ceki Gülcü [EMAIL PROTECTED] Reply-To: Log4J Users List [EMAIL PROTECTED] To: Log4J Users List [EMAIL PROTECTED] Subject: Re: Fwd: Log4J400 - Appender for IBM AS/400 MessageQueue and DataQueue Date: Fri, 29 Aug 2003 17:13:51 +0200 Gurkha, Done. Please let me know if you would like to change the text. At 10:56 AM 8/29/2003 -0400, you wrote: Who can I contact to get this appender listed on Log4J homepage? Regards Gurkha Hello, I have written appenders for the AS/400 (aka IBM iSeries) MessageQueue and DataQueue. Due to dependencies, I cannot submit it to the Apache Log4J project. I have hosted the project on SourceForge. I request you to consider adding it to the the download page under the third party extensions section. The link to the Log4J400 website is http://log4j400.sourceforge.net/ Regards, Gurkha -- Ceki For log4j documentation consider The complete log4j manual ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Get MSN 8 and help protect your children with advanced parental controls. http://join.msn.com/?page=features/parental - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how do I log an exception stacktrace
Yep, the output methods are overloaded to take either one or two parameters. I always have the first one as a string, and the second one (id there is one) as an exception. Here is example output: One argument 2003-08-21 10:57:18,708 [ExecuteThread: '9' for queue: 'default'] DEBUG (AssetDetail.java:34) - Got create asset detail statement... Two arguments 2003-08-21 10:57:19,702 [ExecuteThread: '9' for queue: 'default'] FATAL (AssetDetail.java:44) - Error in createAssetDetail java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at KEY_ASSIST.AE_ASSET_EVENT_INTERFACE, line 13 ORA-06512: at line 1 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289) at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573) at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891) at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093) at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047 ) at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java :2709) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState ment.java:589) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.j ava:656) at weblogic.jdbc.jts.Statement.execute(Statement.java:485) at weblogic.jdbc.rmi.internal.PreparedStatementImpl.execute(PreparedStatementIm pl.java:358) at weblogic.jdbc.rmi.SerialPreparedStatement.execute(SerialPreparedStatement.ja va:401) at uk.co.cpp.npp.asset.AssetDetail.createAssetDetail(AssetDetail.java:40) at uk.co.cpp.npp.asset.NppAssetManagementBean.createAssetDetail(NppAssetManagem entBean.java:471) at uk.co.cpp.npp.asset.NppAssetManagementBean_1ad05n_EOImpl.createAssetDetail(N ppAssetManagementBean_1ad05n_EOImpl.java:1166) at java.lang.reflect.Method.invoke(Native Method) at weblogic.webservice.component.slsb.SLSBInvocationHandler.invoke(SLSBInvocati onHandler.java:84) at weblogic.webservice.core.handler.InvokeHandler.handleRequest(InvokeHandler.j ava:78) at weblogic.webservice.core.HandlerChain.handleRequest(HandlerChain.java:131) at weblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:539) at weblogic.webservice.core.DefaultWebService.invoke(DefaultWebService.java:264 ) at weblogic.webservice.server.servlet.ServletBase.serverSideInvoke(ServletBase. java:362) at weblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke(WebSer viceServlet.java:269) at weblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.java:346) at weblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServiceServle t.java:237) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle tStubImpl.java:1058) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :401) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :306) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W ebAppServletContext.java:5412) at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage r.java:744) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo ntext.java:3086) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java :2544) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134) -Original Message- From: Thomas Muller [mailto:[EMAIL PROTECTED] Sent: 29 August 2003 15:28 To: Log4J Users List Subject: RE: how do I log an exception stacktrace ... } catch( Exception e ) { logger.debug( e.getMessage(), e ); } ... -- Thomas | -Original Message- | From: Andreas Bothner [ MTN - Innovation Centre ] | [mailto:[EMAIL PROTECTED] | Sent: 29 August 2003 14:55 | To: Log4J Users List | Subject: how do I log an exception stacktrace | | | Hi, | | I apologize if this is a stupid question, but how would I log out an | exception's stacktrace using logger.debug() ? | | Regards, | Andreas Bothner | Systems Integrator | | | NOTE: This e-mail message is subject to the MTN Group disclaimer | see http://www.mtn.co.za/email_disclaimer.asp | | - | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | |
RE: Log file location
At 10:50 AM 8/29/2003 -0400, you wrote: Re: Bug in jBoss Alas. Actually/unfortunately the 2.3 (and 2.4 proposed final draft) Servlet spec only 'suggests' that the Containers ClassLoader give preference to the WebApp (http://www.jcp.org/aboutJava/communityprocess/final/jsr053/): SRV.9.7.2 Web Application Classloader ...It is recommended also that the application class loader be implemented so that classes and resources packaged within the WAR are loaded in preference to classes and resources residing in container-wide library JARs. Note the use of the word 'recommended' and not 'required' Thanks for pointing that out. I guess if you hear something enough times, it becomes true, but I, obviously, should have gone back and read the actual spec on this point. That is really problematic for trying to run apps which use different versions of libraries. I wonder how JBoss users deal with that? FWIW, I have always ended up punting on this one and placing my log4j configuration into the jBoss server's log4j.xml file. Perhaps jBoss 4.X has addressed this (I have not used it yet)? I always end up using a repository selector and doing my own configuration from a servlet context listener and never count on default initialization. What I'd like to find out is if JBoss includes its own repository selector an server startup. It doesn't sound like it does at this point. That is where the InitContextListener from logj4-sandbox comes in. It attempts to install a repository selector if one is provided in the context-param's used by InitContextListener. Hmm... I need to learn more about logging in JBoss. Jake At 02:05 AM 8/28/2003 -0500, Jacob Kjome wrote: Well, if you your app is seeing jboss/lib/log4j.jar in preference to WEB-INF/lib/log4j.jar, then there is a bug in JBoss. The Servlet spec states that (contrary to the normal Java2 classloading scheme) classes and libraries in WEB-INF/classes and WEB-INF/lib are checked first for classloading and if the classes are not found there, only then does it look to a higher classloader to attempt to load the classes. I know JBoss has some concept of a single classloader across the whole server (I think that is what I read), but if it doesn't allow for a separate WebappClassLoader, then I think it is a spec compliance violation. What does the JBoss group have to say about this? Putting log4j.jar in WEB-INF/lib *should* provide a completely separate logging environment from the one JBoss uses. Jake At 12:09 PM 8/28/2003 +0530, you wrote: Hi Jake, Thanks for the information. I have gone through the stuff you've written. Here's what I'm doing: 1. I placed log4j-1.2.8.jar in WEB-INF/lib 2. I placed log4j.properties in WEB-INF/classes 3. I deployed the application on JBoss 3.2.1 By default, JBoss has log4j.jar in jboss/lib which is in my classpath. So, even my application class loader takes the classes from log4j.jar located in jboss/lib? If I remove log4j.jar in jboss/lib, then I think I will not get server log of JBoss. How to solve this issue? Please inform. Sriram -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 11:00 AM To: Log4J Users List Subject: RE: Log file location Hi Sriram, Do you have log4j.jar in WEB-INF/lib? If not, I'd expect default initialization not to work. Remember that the webapp class loader can see parent class loaders, but the parents cannot see the webapp class loader, hence your log4j.properties will definitely not be found. If you are trying to use log4j.jar in a parent class loader and want your own configuration file to be used in your own logging space, then you will need to use a repository selector. See the log4j-sandbox for working examples. I wrote something up about this stuff here... http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/AppContainerLogging Jake At 09:35 AM 8/28/2003 +0530, you wrote: The properties file is not being read at all I placed it in WEB-INF/classes. Still it's not being read. I am JBoss and JBoss contains log4j.jar by default and it has log4j.xml in default/conf folder. Probably even my application is taking log4j.xml from that location by default. I need to check that. Anyone who has implemented log4j for their applications on JBoss, pl. suggest. Sriram -Original Message- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 6:52 PM To: Log4J Users List Subject: Re: Log file location Is the properties file being read at all? At 06:25 PM 8/27/2003 +0530, sriram wrote: Hi, I am unable to set log file location. I searched the forum for old messages and found some. I tried the way it was mentioned in those messages, but still my problem is not solved. My log4j.properties file is as follows: log4j.rootCategory=WARN, dest1, R log4j.appender.dest1=org.apache.log4j.ConsoleAppender
ConfigureAndWatch with Webwork
Hi I've just started using Log4J and had a couple of doubts about how to set it up for a web-based application that uses Webwork. 1. Since Webwork configures log4j to use Configure, is there any way that can be changed to ConfigureAndWatch, without going into Webwork code. 2. Since there are multiple entry-points for the application, where should I specify the Configurator details (essentially, the ConfigureAndWatch method call) thanks a lot Rajat. - Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software