Re: High CPU usage impact to log4j
I am doubting if you are on the right path tracking the real problem. On Wed, Jun 24, 2009 at 4:22 PM, Arica xun...@263.net wrote: Hi, buddies I deployed the log4j as the logging tool of my JVM. Recently, I found that the log4j does not work, I could not find any log output when the JVM encountered the high CPU usage issue. In the case, the JVM took more than 90% CPU usage. I really want to know that my JVM is doing...I know I can do it through JVM thread dump. But the question is why log4j does not output any logs? I cannot find any warning from the guild to state that log4j will lose logs during the CPU penic. Do you have any idea about that? Or does log4j define any threshold of CPU usage? Thanks. -- View this message in context: http://www.nabble.com/High-CPU-usage-impact-to-log4j-tp24179322p24179322.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
How to change the DEBUG level log message to be displayed in stdout
Hey guys, I would like to know how to change the DEBUG level log message to be displayed in stdout ? Any useful info will be appreciate. John
log4j download broken links
The link for the *logging-log4j-1.3alpha-6* [.tar.gz and .zip] on all mirrors seems to be corrupt. It reads *http://hostlogging/log4j/1.3alpha-6/logging-log4j-1.3alpha-6.ext *or *http://host/distlogging/log4j/1.3alpha-6/logging-log4j-1.3alpha-6.ext* instead of *http://host/logging/log4j/1.3alpha-6/logging-log4j-1.3alpha-6.ext *or *http://host/dist/logging/log4j/1.3alpha-6/logging-log4j-1.3alpha-6.ext* (no / between host / host/dist and logging). I can dowload the archive from the (manually edited) second link OK. -Allen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Appender, ErrorHanlder fail over deadlock
I have found and proved that Log4J does have a deadlock situation in it's appender failover logic. In a nutshell heres whats happening. The entire instance of the logger is syncronized. (Actually the syncronized object is the Category object from which the Logger is derived.) A caller makes a log call Log.(), in this case the JDBC appender. If the database is down the DB call throws which in turn calls the errorHandler, which in turn calls back into the Logger (deadlock) to swap out the primary and backup appenders. I guess what I'm going to do is to bust out another thread for the sole purpose of handling failover logic. Comments, input? Al Harper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FallbackErrorHandler hangs up thread
Ok, and thank your very much. Al -Original Message- From: Curt Arnold [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 11:03 AM To: Log4J Users List Subject: Re: FallbackErrorHandler hangs up thread On Mar 3, 2005, at 10:40 AM, Harper, Allen (AHARPER) wrote: I have added the FallbackErrorHandler in my XML config for failover if the JDBC appender fails. The JDBC appender is under control of the ASYNC appender. In my test I deliberately shutdown MySQL to cause DB access failure. FallbackErrorHandler does pick up on the failure and attempts to switch over. Unfortunately in the error routine when the following line is called the thread locks indefinitely. I can't seem to even step into it. l.removeAppender(primary); Has anyone else run into this problem? Below is my XML config for review. I urgently need this resolved and would appreciate any help. FallbackErrorHandler has been removed from the log4j CVS due to reliability issues and JDBCAppender has been deprecated in favor of DBAppender. Likely your best approach (assuming that you need to work with 1.2.x) would be to extend JDBCAppender and implement whatever fallback behavior you need there. - 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: FallbackErrorHandler hangs up thread
Curt, The lockup is in the errorhandler, or is this problem related to the JDBCAppender in some way. Can you shine any further light on this? Al -Original Message- From: Curt Arnold [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 11:03 AM To: Log4J Users List Subject: Re: FallbackErrorHandler hangs up thread On Mar 3, 2005, at 10:40 AM, Harper, Allen (AHARPER) wrote: I have added the FallbackErrorHandler in my XML config for failover if the JDBC appender fails. The JDBC appender is under control of the ASYNC appender. In my test I deliberately shutdown MySQL to cause DB access failure. FallbackErrorHandler does pick up on the failure and attempts to switch over. Unfortunately in the error routine when the following line is called the thread locks indefinitely. I can't seem to even step into it. l.removeAppender(primary); Has anyone else run into this problem? Below is my XML config for review. I urgently need this resolved and would appreciate any help. FallbackErrorHandler has been removed from the log4j CVS due to reliability issues and JDBCAppender has been deprecated in favor of DBAppender. Likely your best approach (assuming that you need to work with 1.2.x) would be to extend JDBCAppender and implement whatever fallback behavior you need there. - 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: FallbackErrorHandler hangs up thread
I take it your refering to the list archives. Can you search the list archives if so? Al -Original Message- From: Curt Arnold [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 11:43 AM To: Log4J Users List Subject: Re: FallbackErrorHandler hangs up thread I wasn't involved in the project when those things were being hashed out and haven't worked with either. Maybe the archives or others can be more helpful. On Mar 3, 2005, at 11:09 AM, Harper, Allen (AHARPER) wrote: Curt, The lockup is in the errorhandler, or is this problem related to the JDBCAppender in some way. Can you shine any further light on this? Al - 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]
FallbackErrorHandler hangs up thread
I have added the FallbackErrorHandler in my XML config for failover if the JDBC appender fails. The JDBC appender is under control of the ASYNC appender. In my test I deliberately shutdown MySQL to cause DB access failure. FallbackErrorHandler does pick up on the failure and attempts to switch over. Unfortunately in the error routine when the following line is called the thread locks indefinitely. I can't seem to even step into it. l.removeAppender(primary); Has anyone else run into this problem? Below is my XML config for review. I urgently need this resolved and would appreciate any help. Thanks Al Harper log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; !-- =Appenders for CSF=-- appender name=ASYNC class=org.apache.log4j.AsyncAppender param name=BufferSize value=1/ appender-ref ref=CSF_JDBC/ /appender appender name=CSF_FILE class=org.apache.log4j.RollingFileAppender param name=Threshold value=DEBUG/ param name=File value=C:/selfserv/logs/platformimpl.html/ param name=Append value=true/ param name=MaxFileSize value=500KB/ param name=MaxBackupIndex value=1/ layout class=org.apache.log4j.HTMLLayout/ /appender !--JDBC-- appender name=CSF_JDBC class=org.apache.log4j.jdbc.JDBCAppender errorHandler class=org.apache.log4j.varia.FallbackErrorHandler logger-ref ref=PlatformImpl/ appender-ref ref=CSF_FILE/ /errorHandler param name=BufferSize value=1/ param name=Threshold value=DEBUG/ param name=driver value=com.mysql.jdbc.Driver/ param name=URL value=jdbc:mysql://localhost:3306/logtest?autoReconnect=true/ param name=user value=aharper/ param name=password value=aharper/ param name=sql value=insert into %X{table} (id, cor_key, date, fileName, lineNumber, message) values (0, '%X{key}', '%d', '%F', '%L', '%m')/ /appender appender name=CONSOLE class=org.apache.log4j.ConsoleAppender param name=Target value=System.out/ param name=Threshold value=DEBUG/ layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d, %F, %L, %m%n/ /layout /appender logger name=PlatformImpl level value=DEBUG/ appender-ref ref=ASYNC/ !--appender-ref ref=CSF_FILE/ -- appender-ref ref=CONSOLE/ /logger !-- root level value=DEBUG/ appender-ref ref=ASYNC/ appender-ref ref=CSF_FILE/ appender-ref ref=CONSOLE/ /root -- /log4j:configuration - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Extend or Wrap
I'm looking at it. Can you save time. What page? Al -Original Message- From: Lutz Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 01, 2005 4:13 PM To: 'Log4J Users List' Subject: RE: Extend or Wrap wrap. Ceki is very clear about this in his book. -Original Message- From: Harper, Allen (AHARPER) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 01, 2005 5:04 PM To: Log4J Users List Subject: Extend or Wrap So, whats everone recommendations as to whether you should wrap, or extend Logger? Whats the pros and cons? Al Harper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- This message and any included attachments are from Siemens Medical Solutions USA, Inc. and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by e-mail with a copy to [EMAIL PROTECTED] 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]
RE: Extend or Wrap
Never mind, I may have found it. Al -Original Message- From: Lutz Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 01, 2005 4:13 PM To: 'Log4J Users List' Subject: RE: Extend or Wrap wrap. Ceki is very clear about this in his book. -Original Message- From: Harper, Allen (AHARPER) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 01, 2005 5:04 PM To: Log4J Users List Subject: Extend or Wrap So, whats everone recommendations as to whether you should wrap, or extend Logger? Whats the pros and cons? Al Harper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- This message and any included attachments are from Siemens Medical Solutions USA, Inc. and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by e-mail with a copy to [EMAIL PROTECTED] 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]
RE: XML Configurator Parameter List
That's great for proceedurally setting parameters, but if your doing pure XML config that won't help. For instance refer to my example for setting the bufferSize below. Proceedurally you - asyncAppender.setBufferSize(ASYNC_APPENDER_SIZE); Event the text is different. Have I missed something, or do you get my point ? Al -Original Message- From: James Stauffer [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 2:25 PM To: Log4J Users List Subject: Re: XML Configurator Parameter List Harper, Allen (AHARPER) [EMAIL PROTECTED] wrote: Where can I find a COMPREHENSIVE list of all the parameters that acompany the logger, appender, layout, etc, etc elements In the Log4J XML configuration file. For example: appender name=ASYNC class=org.apache.log4j.AsyncAppender param name=bufferSize value=1/ appender-ref ref=CSF_JDBC/ /appender No where in the manual is the parameter bufferSize discussed. This parameter and many other are not even mentioned. Check out the javadocs and look for set methods. Those are basically what you can set. -- James Stauffer http://www.geocities.com/stauffer_james/ - 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: XML Configurator Parameter List
Standby ... Al -Original Message- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 2:55 PM To: Log4J Users List; Log4J Users List; James Stauffer Subject: RE: XML Configurator Parameter List At 09:38 PM 2/24/2005, Harper, Allen (AHARPER) wrote: If you try that you'll find it's a bust. Specifically with the buffer size . It's case sensitive and must be bufferSize. Al, this is simply not true. I found this out by stepping into source code. Al -- Ceki Gülcü The complete log4j manual: http://www.qos.ch/log4j/ - 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: XML Configurator Parameter List
Don't know if it matters, but I think I am correct. I just changed the following XML line ... param name=bufferSize value=1/ To param name=buffersize value=1/ and step into log4J to this routine: public void setProperty(String name, String value) { if (value == null) return; name = Introspector.decapitalize(name); PropertyDescriptor prop = getPropertyDescriptor(name); //LogLog.debug(-Key: +name+, type=+prop.getPropertyType()); if (prop == null) { LogLog.warn(No such property [ + name + ] in + obj.getClass().getName()+. ); } else { try { setProperty(prop, name, value); } catch (PropertySetterException ex) { LogLog.warn(Failed to set property [ + name + ] to value \ + value + \. , ex.rootCause); } } } and prop return null if bufferSize case is not correct. Al -Original Message- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 2:55 PM To: Log4J Users List; Log4J Users List; James Stauffer Subject: RE: XML Configurator Parameter List At 09:38 PM 2/24/2005, Harper, Allen (AHARPER) wrote: If you try that you'll find it's a bust. Specifically with the buffer size . It's case sensitive and must be bufferSize. Al, this is simply not true. I found this out by stepping into source code. Al -- Ceki Gülcü The complete log4j manual: http://www.qos.ch/log4j/ - 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: XML Configurator Parameter List
I didn't finish a statement in my last email in the first line. I don't know if it matters but my original email cited the JDBCAppender having trouble With bufferSize when actual it was the asyncAppender. But then it may not matter. Al -Original Message- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 2:55 PM To: Log4J Users List; Log4J Users List; James Stauffer Subject: RE: XML Configurator Parameter List At 09:38 PM 2/24/2005, Harper, Allen (AHARPER) wrote: If you try that you'll find it's a bust. Specifically with the buffer size . It's case sensitive and must be bufferSize. Al, this is simply not true. I found this out by stepping into source code. Al -- Ceki Gülcü The complete log4j manual: http://www.qos.ch/log4j/ - 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: XML Configurator Parameter List
Ok, I stand corrected on that point. Both cases do work. Al -Original Message- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 3:40 PM To: Log4J Users List Subject: RE: XML Configurator Parameter List Ok. Log4j uses the usual java introspection mechanism. So, property names are case sensitive except for the first letter. So, for AsyncAppender, param name=BufferSize value=1/ param name=bufferSize value=1/ will work, but not param name=buffersize value=1/ Does that clarify the matter? At 10:03 PM 2/24/2005, you wrote: Don't know if it matters, but I think I am correct. I just changed the following XML line ... param name=bufferSize value=1/ To param name=buffersize value=1/ and step into log4J to this routine: public void setProperty(String name, String value) { if (value == null) return; name = Introspector.decapitalize(name); PropertyDescriptor prop = getPropertyDescriptor(name); //LogLog.debug(-Key: +name+, type=+prop.getPropertyType()); if (prop == null) { LogLog.warn(No such property [ + name + ] in + obj.getClass().getName()+. ); } else { try { setProperty(prop, name, value); } catch (PropertySetterException ex) { LogLog.warn(Failed to set property [ + name + ] to value \ + value + \. , ex.rootCause); } } } and prop return null if bufferSize case is not correct. Al -Original Message- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 2:55 PM To: Log4J Users List; Log4J Users List; James Stauffer Subject: RE: XML Configurator Parameter List At 09:38 PM 2/24/2005, Harper, Allen (AHARPER) wrote: If you try that you'll find it's a bust. Specifically with the buffer size . It's case sensitive and must be bufferSize. Al, this is simply not true. I found this out by stepping into source code. Al -- Ceki Gülcü The complete log4j manual: http://www.qos.ch/log4j/ - 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] -- Ceki Gülcü The complete log4j manual: http://www.qos.ch/log4j/ - 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]
JDBCAppender help
Can anyone please send me an example using the current implementation of the JDBCAppender class. Please include everything I need to do a table entry, PatternLayout strings, JDBCAppender Setup etc. Thanks much. Al Harper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JDBCAppender help
Thank you! Al -Original Message- From: WYNIWYG MOUAWAD Philippe (CAMPUS) [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 11:44 AM To: Log4J Users List Subject: RE: JDBCAppender help http://www.dankomannhaupt.de/projects/ -Original Message- From: Harper, Allen (AHARPER) [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 6:42 PM To: Log4J Users List Subject: JDBCAppender help Can anyone please send me an example using the current implementation of the JDBCAppender class. Please include everything I need to do a table entry, PatternLayout strings, JDBCAppender Setup etc. Thanks much. Al Harper - 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]
MDC in XMLLayout
Is MDC support in XMLLayout? Al Harper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding element to XMLFormatter
Is it possible to add an element and/or an attribute to the XML formatter? It seems that you can. I've order the log4j book in hopes discovering some of the goodies. Hopefully This is one of them. While waiting on the book I was hoping someone could assist me with this if it's not too Hard. Thanks Al Harper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding element to XMLFormatter
Can MDC be used with the XML formatter? Thanks Al Harper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
UGLI Documentation
Is the UGLI API thoroughly discussed in the log4j The Complete Manual ? Al Harper
RE: UGLI Documentation
One more question. When will the next edition (UGLI) be out ? Al -Original Message- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 25, 2005 10:08 AM To: Log4J Users List Subject: Re: UGLI Documentation Al, No, UGLI is not covered in the current edition of The complete log4j manual. However, if you opt for the yearly subscription, you'll also get the next edition which will cover UGLI. At 05:02 PM 1/25/2005, Harper, Allen (AHARPER) wrote: Is the UGLI API thoroughly discussed in the log4j The Complete Manual ? Al Harper -- Ceki Gülcü The complete log4j manual: http://www.qos.ch/log4j/ - 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: UGLI Documentation
We just sent in the the order for the single current edition. What do I need to do to upgrade the order if I decide to ? Al Harper -Original Message- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 25, 2005 10:08 AM To: Log4J Users List Subject: Re: UGLI Documentation Al, No, UGLI is not covered in the current edition of The complete log4j manual. However, if you opt for the yearly subscription, you'll also get the next edition which will cover UGLI. At 05:02 PM 1/25/2005, Harper, Allen (AHARPER) wrote: Is the UGLI API thoroughly discussed in the log4j The Complete Manual ? Al Harper -- Ceki Gülcü The complete log4j manual: http://www.qos.ch/log4j/ - 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: logger.info() logs twice to the console
Hello, Is there any way to remove my name from this email list ??? Thank You, Let me know if I can be of any more Service to You, John Allen Air Import Agent Expeditors International - SFO Email: [EMAIL PROTECTED] Ph: (650) 737-1712 Fax: (650) 737-0933 Alan Brown [EMAIL PROTECTED]To: Log4J Users List logy.com [EMAIL PROTECTED] cc: (bcc: John Allen/SFO/Expeditors) 06/01/04 03:33 PMSubject: RE: logger.info() logs twice to the console Please respond to Log4J Users List It sounds like you've not set additivity correctly (there's been a post on that subject already today). your logger may have 2 appenders set to it, the fileAppender and a consoleAppender. This is in addition to the root logger which also has a consoleAppender causing double logging. Or it could be that you have a hierarchy of loggers. Root the parent of X that is the parent of Y. If X and Root both log to the console and Y logs to a file, then you'd see the behaviour you describe. You need to set additivity to False to prevent the logging events propagating up the logger hierarchy. It's hard to tell unless you post your config file. alan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 01, 2004 12:53 PM To: [EMAIL PROTECTED] Subject: logger.info() logs twice to the console Hi, I am seeing logger.info() requests to log the same messgae twice on the console. The logger has a FileAppender also and the files contains a single log of the twicely-logged-on-the-console message. Here's some pseudocode: class Foo { //create a logger object on Foo.class //add apenders = File and Console //start a process and open an input and output pipes to the process //for each command written to the input pipe read the process's output from the output pipe and log it using logger.info(logMessage) } Again, what I am seeing is that the logMessage gets logged twice on the console (unexpected), and once on the log file (expected). Any suggestions? Thanks, Nik - 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: log4j:ERROR Failed to rename [../logs/performance.log] to [../logs/performance.log.2004-05-04].
Please remove me from all of these IS-related emails. Thank You! Let me know if I can be of any more Service to You, John Allen Air Import Agent Expeditors International - SFO Email: [EMAIL PROTECTED] Ph: (650) 737-1712 Fax: (650) 737-0933 Allistair CrossleyTo: Log4J Users List Allistair.Crossl [EMAIL PROTECTED] [EMAIL PROTECTED] cc: (bcc: John Allen/SFO/Expeditors) Subject: RE: log4j:ERROR Failed to rename 05/20/04 09:26 AM [../logs/performance.log] to Please respond to [../logs/performance.log.2004-05-04]. Log4J Users List The role Everyone has all access. -Original Message- From: Contreras García Juan Manuel [mailto:[EMAIL PROTECTED] Sent: 20 May 2004 17:08 To: Log4J Users List Subject: RE: log4j:ERROR Failed to rename [../logs/performance.log] to [../logs/performance.log.2004-05-04]. Have you permissions over the directory / files ??? Who is the owner ??? ? ? ? Hi All ? ? We are losing production logging data I have discovered due ? to Log4J not being able to rename logs. I have not the ? slightest idea why this would start happening last week, we ? have successfully been running log4j for a month with the ? rolled files being created. ? ? log4j:ERROR Failed to rename [../logs/performance.log] to ? [../logs/performance.log.2004-05-04]. ? log4j:ERROR Failed to rename [../logs/application.log] to ? [../logs/application.log.2004-05-04]. ? log4j:ERROR Failed to rename [../logs/authentication.log] ? to [../logs/authentication.log.2004-05-04]. ? ? You help appreciated, and rather urgent if it makes a different :) ? ? Cheers!! ADC. ? ? ? FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE ? --- ? QAS Ltd. ? Developers of QuickAddress Software ? a href=http://www.qas.com;www.qas.com/a ? Registered in England: No 2582055 ? Registered in Australia: No 082 851 474 ? --- ? /FONT ? ? ? ? - ? 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logging from multiple instances on same file?
Please remove me from your email list. Thank You Let me know if I can be of any more Service to You, John Allen Air Import Agent Expeditors International - SFO Email: [EMAIL PROTECTED] Ph: (650) 737-1712 Fax: (650) 737-0933 siva kumar [EMAIL PROTECTED]To: [EMAIL PROTECTED] oo.com cc: (bcc: John Allen/SFO/Expeditors) Subject: logging from multiple instances on same file? 05/20/04 11:38 AM Please respond to Log4J Users List Hi i have welogic server created multiple instances under one domain. i want to have a centralized logging like messages from all the instances should be logged in one log file with hostname and instance name. how can achieve this? the following entries in config file will work or is there any better way? log4j.appender.NormalFileAppender.layout.ConversionPattern= localhost:server1 %5p %d{MMM dd HH:mm} (%F:%M():%L) - %m%n or log4j.appender.R.layout.ConversionPattern =[slf5s.start]%d{DATE}[slf5s.DATE]%n {{{ %p[slf5s.PRIORITY]%n%x[slf5s.NDC]%n%t[slf5s.THREAD]%n %c[slf5s.CATEGORY]%n%l[slf5s.LOCATION]%n%m[slf5s.MESSAGE]%n%n plz advise thanks siva __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: null pattern with JMSAppender
Ok it looks like th information is making across the queue. When i pull the message and log it to a Rolling file, I get exactly what I want, however the same problem occurs when i try to pull from the queue and log to the JDBC logger, havent checked but it looks like the patter is not being applied again. Is there a way to get the same to work for the JDBC logger as there is no locationInfo property in the JDBCLogger? here is my comeplete config log4j.category.org.synchronoss.util.logging.test.servlet=debug,JMSAppender log4j.category.org.synchronoss.util.logging.mdb=debug,RollingFile,JDBCAppender #,SNMPTrapAppender log4j.appender.JMSAppender=org.apache.log4j.net.JMSAppender #log4j.appender.JMSAppender=org.synchronoss.util.logging.JMSAppender log4j.appender.JMSAppender.InitialContextFactoryName=weblogic.jndi.WLInitialContextFactory log4j.appender.JMSAppender.ProviderURL=t3://localhost:7001 log4j.appender.JMSAppender.TopicConnectionFactoryBindingName=LoggingConnectionFactory log4j.appender.JMSAppender.TopicBindingName=LoggingTopic log4j.appender.JMSAppender.UserName=system log4j.appender.JMSAppender.password=security log4j.appender.JMSAppender.locationInfo=true log4j.appender.JMSAppender.layout=org.apache.log4j.PatternLayout log4j.appender.JMSAppender.layout.ConversionPattern=(%C:%M:%L) - %m%n log4j.appender.RollingFile=org.apache.log4j.RollingFileAppender log4j.appender.RollingFile.File=central.log log4j.appender.RollingFile.MaxFileSize=500MB log4j.appender.RollingFile.MaxBackupIndex=5 log4j.appender.RollingFile.layout=org.apache.log4j.PatternLayout log4j.appender.RollingFile.layout.ConversionPattern=%d{-MM-dd HH:mm:ss} %-5p (%C:%M:%L) - %m%n log4j.appender.JDBCAppender=org.synchronoss.util.logging.JDBCAppender # Using a commercial jdbc driver for ms slq server; use the URL of your driver instead #log4j.appender.JDBCAppender.URL=dbc:oracle:thin:@pamdfsr2901.synchronoss.net:1521:dtxn log4j.appender.JDBCAppender.DataSourceName=LoggingDataSource #log4j.appender.JDBCAppender.user=awe #log4j.appender.JDBCAppender.password=awe #log4j.appender.JDBCAppender.sql=INSERT INTO LOGGER_LOG (log_level, class, method, message) values ('%p', '%C', '%M', '%m') #log4j.appender.JDBCAppender.sql=INSERT INTO LOGGER_LOG (log_time, log_level, class, method, line_num, message) values \ #(TO_DATE('%d{dd/MM/ kk:mm:ss}','DD/MM/ HH24:MI:SS'), '%p', '%C', '%M', '$L', '%m') log4j.appender.JDBCAppender.sql=INSERT INTO LOGGER_LOG (log_time, log_level, message) values \ (TO_DATE('%d{dd/MM/ kk:mm:ss}','DD/MM/ HH24:MI:SS'), '%p', '%m') log4j.appender.JDBCAppender.layout=org.apache.log4j.PatternLayout #log4j.appender.SNMPTrapAppender=org.apache.log4j.ext.SNMPTrapAppender #log4j.appender.SNMPTrapAppender.ImplementationClassName=org.apache.log4j.ext.JoeSNMPTrapSender #log4j.appender.SNMPTrapAppender.ManagementHost=10.7.45.73 #traps on 162 #log4j.appender.SNMPTrapAppender.ManagementHostTrapListenPort=162 #log4j.appender.SNMPTrapAppender.EnterpriseOID=1.3.6.1.4.1.24.0 #log4j.appender.SNMPTrapAppender.EnterpriseOID=1.3.6.1.4.1.140.625 #log4j.appender.SNMPTrapAppender.LocalIPAddress=127.0.0.1 #log4j.appender.SNMPTrapAppender.LocalTrapSendPort=162 #log4j.appender.SNMPTrapAppender.GenericTrapType=6 #log4j.appender.SNMPTrapAppender.SpecificTrapType=12345678 #log4j.appender.SNMPTrapAppender.ApplicationTrapOID=1.3.6.1.4.1.24.12.10.22.64 #log4j.appender.SNMPTrapAppender.ApplicationTrapOID=1.3.6.1.4.1.140.625.60 #log4j.appender.SNMPTrapAppender.CommunityString=public #log4j.appender.SNMPTrapAppender.ForwardStackTraceWithTrap=true #log4j.appender.SNMPTrapAppender.Threshold=DEBUG #log4j.appender.SNMPTrapAppender.layout=org.apache.log4j.PatternLayout #log4j.appender.SNMPTrapAppender.layout.ConversionPattern=%d,%p,[%t],[%c],%m%n -Original Message- From: Ceki Glc [mailto:[EMAIL PROTECTED] Sent: Wed 4/14/2004 1:20 PM To: Log4J Users List Cc: Subject:RE: null pattern with JMSAppender At 07:01 PM 4/14/2004, Aristotle Allen wrote: Ceki, First off, thanks for the quick reply. I'm not sure what yo mean to set the LocationInfo can you exmpain in more detail? Do i need an additional property? OR should I extend the JMS appender nd modify it? The LocationInfo property is part of the JMSAppender. Just set it to true. See: http://logging.apache.org/log4j/docs/api/org/apache/log4j/net/JMSAppender.html or more succinctly http://tinyurl.com/2m22d I hope this helps, Thanks again - Ari -Original Message- From: Ceki Glc [mailto:[EMAIL PROTECTED] Sent: Wed 4/14/2004 10:21 AM To: Log4J Users List Cc: Subject:Re: null pattern with JMSAppender Aristotle, JMSAppender does not need a layout. To achieve what you have in mind, simply set the LocationInfo property of the JMSAppender. HTH, At 03:06 PM 4/14/2004, Aristotle B. Allen wrote: I'm trying to use the JMSAppender for distributed logging, however I need classname, method, and line_num in my message, because
null pattern with JMSAppender
I'm trying to use the JMSAppender for distributed logging, however I need classname, method, and line_num in my message, because the remote system where the JMSappender re-logs the message does not appear to be to have the objects necessary to get that information. I have attempted to use a layout, but it is not being applied, in fact the Layout for the LoggingEvent is null? How can I force the JMSAppender to apply this pattern before it creates the ObjectMessage and puts it on my topic? Here is my config log4j.appender.JMSAppender=org.apache.log4j.net.JMSAppender log4j.appender.JMSAppender.InitialContextFactoryName=weblogic.jndi.WLInitialContextFactory log4j.appender.JMSAppender.ProviderURL=t3://localhost:7001 log4j.appender.JMSAppender.TopicConnectionFactoryBindingName=LoggingConnectionFactory log4j.appender.JMSAppender.TopicBindingName=LoggingTopic log4j.appender.JMSAppender.UserName=system log4j.appender.JMSAppender.password=security log4j.appender.JMSAppender.layout=org.apache.log4j.PatternLayout log4j.appender.JMSAppender.layout.ConversionPattern=(%C:%M:%L) - %m%n -- Aristotle B. Allen Sr. Engineer Synchronoss Technologies Inc. 610.814.5598 perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
John Allen/IS/Expeditors is out of the office.
I will be out of the office starting 02/10/2004 and will not return until 02/12/2004. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]