Re: Log4j and unique message identities
We use a transaction id which we put in MDC and print using the %X{MDC_KEY} notation in the conversion pattern. On Tue, Jun 2, 2009 at 12:57 AM, David Grigglestone dav...@progress.comwrote: Maybe I'm missing something in the API but I don't see API support for associating a unique (e.g. numeric) identifier to a message. Unique message identifiers are useful in production systems to allow: * Easy message identification irrespective of localization * A key on which JIRA or knowledge base issues can be based * A key from which automated management actions can be triggered The best I can think of is embedding such an identifier in a message, e.g. [#2506] System has a headache. How have others dealt with this need? Are there any additional logging libraries that can help deal with this issue or any other relevant works that may be of interest? thanks for your input, David - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Looking for an extended Daily Rolling File Appender
Hi there! I'm looking for an Appender which offers the functionality of the Daily Rolling File Appender plus one more thing: It must be able to log only Information containing a given keyword. I.e. i want to define a specific material number as keyword, and only information concerning this material number should be logged by this appender. I hope you have a hint for me. Thanks for your help. -- View this message in context: http://www.nabble.com/Looking-for-an-extended-Daily-Rolling-File-Appender-tp23829677p23829677.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
Re: Looking for an extended Daily Rolling File Appender
Did you look at the log4j Filter support? On Tue, Jun 2, 2009 at 1:22 PM, collatz ny...@nurfuerspam.de wrote: Hi there! I'm looking for an Appender which offers the functionality of the Daily Rolling File Appender plus one more thing: It must be able to log only Information containing a given keyword. I.e. i want to define a specific material number as keyword, and only information concerning this material number should be logged by this appender. I hope you have a hint for me. Thanks for your help. -- View this message in context: http://www.nabble.com/Looking-for-an-extended-Daily-Rolling-File-Appender-tp23829677p23829677.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
RE: Looking for an extended Daily Rolling File Appender
Why not use grep and cron? (There seems to be an endless movement to try and make Log4j perform the tasks already performed perfectly by established tools!) Regards, Michael Erskine. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: Log4j and unique message identities
Thanks Yair That will work for log4j. Don't see any equivalent in commons-logging .. any thoughts there anyone? Yair Ogen wrote: We use a transaction id which we put in MDC and print using the %X{MDC_KEY} notation in the conversion pattern. On Tue, Jun 2, 2009 at 12:57 AM, David Grigglestone dav...@progress.comwrote: Maybe I'm missing something in the API but I don't see API support for associating a unique (e.g. numeric) identifier to a message. Unique message identifiers are useful in production systems to allow: * Easy message identification irrespective of localization * A key on which JIRA or knowledge base issues can be based * A key from which automated management actions can be triggered The best I can think of is embedding such an identifier in a message, e.g. [#2506] System has a headache. How have others dealt with this need? Are there any additional logging libraries that can help deal with this issue or any other relevant works that may be of interest? thanks for your input, David - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: Log4j and unique message identities
why not point commons-logging to log4j and use the log4j API for this? On Tue, Jun 2, 2009 at 3:05 PM, Captain Haddock dav...@progress.com wrote: Thanks Yair That will work for log4j. Don't see any equivalent in commons-logging .. any thoughts there anyone? Yair Ogen wrote: We use a transaction id which we put in MDC and print using the %X{MDC_KEY} notation in the conversion pattern. On Tue, Jun 2, 2009 at 12:57 AM, David Grigglestone dav...@progress.com wrote: Maybe I'm missing something in the API but I don't see API support for associating a unique (e.g. numeric) identifier to a message. Unique message identifiers are useful in production systems to allow: * Easy message identification irrespective of localization * A key on which JIRA or knowledge base issues can be based * A key from which automated management actions can be triggered The best I can think of is embedding such an identifier in a message, e.g. [#2506] System has a headache. How have others dealt with this need? Are there any additional logging libraries that can help deal with this issue or any other relevant works that may be of interest? thanks for your input, David - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: Log4j and unique message identities
Can't do that without importing log4j or using reflection :( Would like to use log4j but may be restricted to commons-logging in places by other factors. Yair Ogen wrote: why not point commons-logging to log4j and use the log4j API for this? On Tue, Jun 2, 2009 at 3:05 PM, Captain Haddock dav...@progress.com wrote: Thanks Yair That will work for log4j. Don't see any equivalent in commons-logging .. any thoughts there anyone? Yair Ogen wrote: We use a transaction id which we put in MDC and print using the %X{MDC_KEY} notation in the conversion pattern. On Tue, Jun 2, 2009 at 12:57 AM, David Grigglestone dav...@progress.com wrote: Maybe I'm missing something in the API but I don't see API support for associating a unique (e.g. numeric) identifier to a message. Unique message identifiers are useful in production systems to allow: * Easy message identification irrespective of localization * A key on which JIRA or knowledge base issues can be based * A key from which automated management actions can be triggered The best I can think of is embedding such an identifier in a message, e.g. [#2506] System has a headache. How have others dealt with this need? Are there any additional logging libraries that can help deal with this issue or any other relevant works that may be of interest? thanks for your input, David - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
How to find which log file the log is being written
HiI have an application which is installed in clustered weblogic environment, and for some reason i do not see any logs in the log file specified in File section I have defined my logger as below, i dont see any log file in my log4jxml.xml file, but only in weblogic log file, how do i find out what is happening with log4jxml.xml appender name=A1 class=org.apache.log4j.DailyRollingFileAppender param name=File value=/myapp/logs/log4jXml.xml / param name=DatePattern value='.'-MM-dd / layout class=org.apache.log4j.xml.XMLLayout /layout /appender appender name=STDOUT class=org.apache.log4j.ConsoleAppender layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d %-5p [%t] %C{2} (%F:%L) - %m%n / /layout /appender root priority value=warn / appender-ref ref=A1 / appender-ref ref=STDOUT / /root
Re: How to find which log file the log is being written
use log4j.debug=true On Tue, Jun 2, 2009 at 5:00 PM, Ashish Kulkarni ashish.kulkarn...@gmail.com wrote: HiI have an application which is installed in clustered weblogic environment, and for some reason i do not see any logs in the log file specified in File section I have defined my logger as below, i dont see any log file in my log4jxml.xml file, but only in weblogic log file, how do i find out what is happening with log4jxml.xml appender name=A1 class=org.apache.log4j.DailyRollingFileAppender param name=File value=/myapp/logs/log4jXml.xml / param name=DatePattern value='.'-MM-dd / layout class=org.apache.log4j.xml.XMLLayout /layout /appender appender name=STDOUT class=org.apache.log4j.ConsoleAppender layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d %-5p [%t] %C{2} (%F:%L) - %m%n / /layout /appender root priority value=warn / appender-ref ref=A1 / appender-ref ref=STDOUT / /root
Re: Log4j and unique message identities
Doesn't SLF4J support MDC in its interfaces? Just start using that. And for code that continues to use the commons-logging API, you can use the slf4j over commons-logging module and the slf4j Log4j module to bind to Log4j. Jake On Tue, 02 Jun 2009 09:05:19 -0400 Captain Haddock dav...@progress.com wrote: Can't do that without importing log4j or using reflection :( Would like to use log4j but may be restricted to commons-logging in places by other factors. Yair Ogen wrote: why not point commons-logging to log4j and use the log4j API for this? On Tue, Jun 2, 2009 at 3:05 PM, Captain Haddock dav...@progress.com wrote: Thanks Yair That will work for log4j. Don't see any equivalent in commons-logging .. any thoughts there anyone? Yair Ogen wrote: We use a transaction id which we put in MDC and print using the %X{MDC_KEY} notation in the conversion pattern. On Tue, Jun 2, 2009 at 12:57 AM, David Grigglestone dav...@progress.com wrote: Maybe I'm missing something in the API but I don't see API support for associating a unique (e.g. numeric) identifier to a message. Unique message identifiers are useful in production systems to allow: * Easy message identification irrespective of localization * A key on which JIRA or knowledge base issues can be based * A key from which automated management actions can be triggered The best I can think of is embedding such an identifier in a message, e.g. [#2506] System has a headache. How have others dealt with this need? Are there any additional logging libraries that can help deal with this issue or any other relevant works that may be of interest? thanks for your input, David - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: How to find which log file the log is being written
How do you configure Log4j? log4jxml.xml will not be picked up for auto-configuration. You'd have to change the name to log4j.xml for that. You can set the Java system property -Dlog4j.debug=true to see Log4j's internal logging, which will show which file it is (or possibly isn't) configuring. Jake On Tue, 2 Jun 2009 10:00:46 -0400 Ashish Kulkarni ashish.kulkarn...@gmail.com wrote: HiI have an application which is installed in clustered weblogic environment, and for some reason i do not see any logs in the log file specified in File section I have defined my logger as below, i dont see any log file in my log4jxml.xml file, but only in weblogic log file, how do i find out what is happening with log4jxml.xml appender name=A1 class=org.apache.log4j.DailyRollingFileAppender param name=File value=/myapp/logs/log4jXml.xml / param name=DatePattern value='.'-MM-dd / layout class=org.apache.log4j.xml.XMLLayout /layout /appender appender name=STDOUT class=org.apache.log4j.ConsoleAppender layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d %-5p [%t] %C{2} (%F:%L) - %m%n / /layout /appender root priority value=warn / appender-ref ref=A1 / appender-ref ref=STDOUT / /root - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: How to find which log file the log is being written
HiWhere do i set this log4j.debug =true, and where would be it print the debug message On Tue, Jun 2, 2009 at 10:09 AM, Yair Ogen yairo...@gmail.com wrote: use log4j.debug=true On Tue, Jun 2, 2009 at 5:00 PM, Ashish Kulkarni ashish.kulkarn...@gmail.com wrote: HiI have an application which is installed in clustered weblogic environment, and for some reason i do not see any logs in the log file specified in File section I have defined my logger as below, i dont see any log file in my log4jxml.xml file, but only in weblogic log file, how do i find out what is happening with log4jxml.xml appender name=A1 class=org.apache.log4j.DailyRollingFileAppender param name=File value=/myapp/logs/log4jXml.xml / param name=DatePattern value='.'-MM-dd / layout class=org.apache.log4j.xml.XMLLayout /layout /appender appender name=STDOUT class=org.apache.log4j.ConsoleAppender layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d %-5p [%t] %C{2} (%F:%L) - %m%n / /layout /appender root priority value=warn / appender-ref ref=A1 / appender-ref ref=STDOUT / /root