automatic LOG4J configuration reloading ?
Hi folks, Is there a way to do an automatic reloading of the log4j configuration declared as -Dlog4j.configuration ? = -- Regards, Ionel Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
some questions regarding chainsaw
Hi ! we are testing chainsaw as a solution for our real time log monitoring environment. i have been playing with the application for a few days and i have a few questions: 1) after configuring a reciever - is there a way to save the configuration so that i will have it ready the next time i open chainsaw ? 2) was chainsaw tested under heavy load of logging events ? 3) once i have defined a new tab (either by configuring a reciever or by creating a custom expression logpanel) how can i remove the tab ? close it ? thanks a lot, Shai Simchi Invoke Solutions Ltd. +972-3-5756828 (ext. 206) +972-66-227746 (mobile) +972-3-5756829 (Fax) mailto:[EMAIL PROTECTED] www.invoke.com
RE: What is the significance of rootCategory in property file.
Hi, The root category is not required in configuration files. It is implicitly created for you whether you specify details for it or not. Most people specify it in order to set the basic level of logging for their system such that 3rd party libraries using log4j aren't logging at too verbose a level. I can't help much with India-specific book purchase questions, besides the obvious avenues I'm sure you're already explored, such as Amazon and eBay, that ship internationally. Yoav Shapira Millennium Research Informatics -Original Message- From: Narendra Babu Kirthi [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 1:54 AM To: [EMAIL PROTECTED] Cc: Narendra Babu Kirthi Subject: What is the significance of rootCategory in property file. Hi, Can some one explain me what is the significance of rootCategory, that is specified in the log4j.properties file ? Is it a must to have rootCategory in the properties file ? I have a web application under tomcat. This web application is integrated from different modules (my project specific) and each module has its own log4j property(with different names) file. Say it has got some 8 modules and got 8 log4j properties files. Each module has got an entry of rootCategory in their own log4j property file. With this configuration, my web application is behaving strangely at times. i.e one module's log messages are logged into some other module's log file. Can I have any number of log4j properties files under a single web application ? If so what is the location under tomcat where I can put all these property files. I tried to buy the Log4j manual by Ceiki, but could not find a store in Chennai (INDIA), where I can get that book. Can some one point me to the location in India, where I can get this book. Thanks Naren - 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: Displaying custom log level in Chainsaw v2
You would need to write a custom Level class and XmlDecoder would need to support a parameter allowing you to specify a custom Level implementation. This change would display the custom level in Chainsaw (if you used text and not icons), but expressions like LEVEL MYCUSTOMLEVEL won't work (they'll all evaluate to DEBUG). I haven't looked into how much work it would be to support this. Scott -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 7:32 AM To: [EMAIL PROTECTED] Subject: Displaying custom log level in Chainsaw v2 Hello, I'm using Chainsaw v2 ( ) to receive and display log messages that come from a C++ program (I use log4cplus 1.0.1 with an inhouse written socket XML appender). I use a custom log level (name=CRITICLA, numeric value 40001) in log4cplus in a log statement. The value is properly embedded in the XML message and sent to Chainsaw. Chainsaw does, however, display the log message tagged with a DEBUG level. It seems that Chainsaw doesn't understand custom log levels without some configuration. What would I need to do to be able to view custom log levels in chainsaw? Thanks loads for any hints! Johannes - 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: Displaying custom log level in Chainsaw v2
We should adapt Level to use some of the enum techniques used in o.a.j.commons.lang.Enum and com.dautelle.util.Enum from JADE. This is listed in my todo list as a priority item. At 08:18 PM 6/3/2004, you wrote: You would need to write a custom Level class and XmlDecoder would need to support a parameter allowing you to specify a custom Level implementation. This change would display the custom level in Chainsaw (if you used text and not icons), but expressions like LEVEL MYCUSTOMLEVEL won't work (they'll all evaluate to DEBUG). I haven't looked into how much work it would be to support this. Scott -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 7:32 AM To: [EMAIL PROTECTED] Subject: Displaying custom log level in Chainsaw v2 Hello, I'm using Chainsaw v2 ( ) to receive and display log messages that come from a C++ program (I use log4cplus 1.0.1 with an inhouse written socket XML appender). I use a custom log level (name=CRITICLA, numeric value 40001) in log4cplus in a log statement. The value is properly embedded in the XML message and sent to Chainsaw. Chainsaw does, however, display the log message tagged with a DEBUG level. It seems that Chainsaw doesn't understand custom log levels without some configuration. What would I need to do to be able to view custom log levels in chainsaw? Thanks loads for any hints! Johannes -- Ceki Gülcü 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]
output to multiple file
I am using a properties file for log4j. I am trying to have different output files for different packages (depending on the way the logger is initialized) Can any one please show an example how to do this.
RE: how to log to different files
Would it be possible to see the full config file and code snipet to see exactly what is going on. Or try mine and see if it works. dwfa -Original Message- From: Sebastian Ho [mailto:[EMAIL PROTECTED] Sent: June 2, 2004 9:38 PM To: Log4J Users List Subject: RE: how to log to different files Hi I have added the following lines but it still doesn't work. log4j.additivity.sg.edu.astar.bii.catcrawler.ui.CrawlSearchProcess = false; log4j.additivity.sg.edu.astar.bii.catcrawler.crawler.WebCrawler = false; log4j.additivity.sg.edu.astar.bii.catcrawler.crawler.HTMLFilter = false; log4j.additivity.sg.edu.astar.bii.catcrawler.crawler.IndexHTML = false; Sebastian On Wed, 2004-06-02 at 07:27, Douglas WF Acheson wrote: This is what I have and it seems to work. The config file. ?xml version = 1.0 encoding=UTF-8 ? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration debug = false xmlns:log4j = 'http://jakarta.apache.org/log4j/' !-- Define the debug log async appender -- appender name = debug.async class = org.apache.log4j.AsyncAppender param name = BufferSize value = 10240/ param name = LocationInfo value = true/ appender-ref ref = debug.file/ /appender !-- Define the debug log worker appender -- appender name = debug.file class = org.apache.log4j.FileAppender param name = Append value = true/ param name = File value = debug.log/ layout class = org.apache.log4j.PatternLayout param name = ConversionPattern value = [%-d{MM/dd/ HH:mm:ss.SSS}][%l - %t] %m%n/ /layout /appender !-- ** -- !-- Define the error log async appender -- appender name = error.async class = org.apache.log4j.AsyncAppender param name = BufferSize value = 10240/ param name = LocationInfo value = true/ appender-ref ref = error.file/ /appender !-- Define the error log worker appender -- appender name = error.file class = org.apache.log4j.FileAppender param name = Append value = true/ param name = File value = error.log/ layout class = org.apache.log4j.PatternLayout param name = ConversionPattern value = [%-d{MM/dd/}][%l - %t] %m%n/ /layout /appender !-- ** -- !-- Define the debug log logger -- logger name = debug additivity = false appender-ref ref = debug.async/ /logger !-- Define the error log logger -- logger name = error additivity = false appender-ref ref = error.async/ /logger !-- ** -- root level value = debug/ !-- appender-ref ref = debug.async/ -- /root /log4j:configuration And the code snipet: DOMConfigurator.configure(args[0]) ; Logger.getLogger(error) ; Logger.getLogger(debug) ; I have include the two file for full reference dwfa -Original Message- From: Sebastian Ho [mailto:[EMAIL PROTECTED] Sent: June 1, 2004 3:34 AM To: [EMAIL PROTECTED] Subject: how to log to different files Hi I wish to have output from classes to go into a log file and some other classes (from the same packages) into another log file. I have the following log4j.properties configuration but it doesn't work. From the config, there are 4 fours that I wish to go into 'searchfile' and all the other classes to log to 'file'. What this produces is both files (searchfile and file) are created and contains exactly the same logs. All logs (including those from the 4 classes) goes into both the files. This is what I have in my Java files. static Logger logger = Logger.getLogger(CatCrawler.class); PropertyConfigurator.configure(path_to_log4j.properties_file); == == = log4j.appender.file=org.apache.log4j.FileAppender log4j.appender.file.File=${user.home}/.catcrawler/log/application.log log4j.appender.file.threshold=debug log4j.appender.file.append=false log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d [%t] %5p %c{1}:%M - %m%n log4j.appender.searchfile=org.apache.log4j.FileAppender log4j.appender.searchfile.File=${user.home}/.catcrawler/log/search.log log4j.appender.searchfile.threshold=debug log4j.appender.searchfile.append=false log4j.appender.searchfile.layout=org.apache.log4j.PatternLayout
RE: writing to multiple files
From: Srivastava, Abhinav [mailto:[EMAIL PROTECTED] log4j.category.X.Additivity=false Is it case sensitive? Try lowercase 'a' for additivity. I have this: # Create an appender called daily: log4j.rootLogger=DEBUG, daily # set the additivity to avoid duplicate messages log4j.additivity.rootLogger=false -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the significance of rootCategory in property file.
Hi Yoav, Thanks alot for the information. Can I have any number of log4j properties files under a single web application ? If so, where to put these properties files under tomcat ? Are there any guidelines that I have to follow if there are many lo4j properties under a single web app ? Any help in this regard will be very useful for me. TIA, Naren Shapira, Yoav wrote: Hi, The root category is not required in configuration files. It is implicitly created for you whether you specify details for it or not. Most people specify it in order to set the basic level of logging for their system such that 3rd party libraries using log4j aren't logging at too verbose a level. I can't help much with India-specific book purchase questions, besides the obvious avenues I'm sure you're already explored, such as Amazon and eBay, that ship internationally. Yoav Shapira Millennium Research Informatics -Original Message- From: Narendra Babu Kirthi [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 1:54 AM To: [EMAIL PROTECTED] Cc: Narendra Babu Kirthi Subject: What is the significance of rootCategory in property file. Hi, Can some one explain me what is the significance of rootCategory, that is specified in the log4j.properties file ? Is it a must to have rootCategory in the properties file ? I have a web application under tomcat. This web application is integrated from different modules (my project specific) and each module has its own log4j property(with different names) file. Say it has got some 8 modules and got 8 log4j properties files. Each module has got an entry of rootCategory in their own log4j property file. With this configuration, my web application is behaving strangely at times. i.e one module's log messages are logged into some other module's log file. Can I have any number of log4j properties files under a single web application ? If so what is the location under tomcat where I can put all these property files. I tried to buy the Log4j manual by Ceiki, but could not find a store in Chennai (INDIA), where I can get that book. Can some one point me to the location in India, where I can get this book. Thanks Naren - 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: writing to multiple files
Try setting the log4j.additivity.X.Y.Z=false -Naren Srivastava, Abhinav wrote: The properties file : log4j.category.X=DEBUG, Ap1 log4j.category.X.Y.Z=DEBUG, Ap2 log4j.category.X.Additivity=false and the code log = LogFactory.getLog(X.Y.Z); log.error(message); I get the output in both the appenders Ap1 and Ap2 though I expect it to go to only Ap2 - 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]
Running the same package in different JVM with the same log4j configuration
Hi, I running one the same server multiple JVM machine which are running the same java package. The log4j configuration file location is in a property file in my logger framework package which is also running in each JVM of course. I using a FileAppender to as log trace. As a File can't be open twice, only one JVM can't write into the file. The problem also occurred for all Appender which extend the FileAppender. As work around I wrote a new FileAppender which use a System property to post fix the file name. So, I can launch different JVM with different System property and then avoid the concurency problem on a non-sharable ressource. I would be nice to have this feature in a future release or have a way or it already exists a way (which I ignore) to avoid this problem. Regards Dominique
Re: Using log4j for writing a library...
I am writing a Java based library for which I am using the log4j package (version 1.2.8) a) Are there any special things we need to worry about configuration. Since you are writing a library, you have to be aware of what log4j does by default if nobody does any configuration at all. Here a message thread that discusses it: http://marc.theaimsgroup.com/?l=log4j-userm=108326596313116w=2 -- [EMAIL PROTECTED] (WJCarpenter)PGP 0x91865119 38 95 1B 69 C9 C6 3D 2573 46 32 04 69 D6 ED F3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]