Re: Setting up log4j.xml
i'm having this config.. i would like to print out error and fatal msgs in the Main class of loggingexample package, how come it is still printing debug level and above msgs? appreciate any help
using SMTP appender - no object DCH for MIME
I'm using SMTP appender following the example I found. Setting setSMTPdebug() proved that I could authenticate. However, the content seems to be adverse to the mail host. I'm using a simple message. I'd appreciate any suggestions on how to fix this problem. I get the following error: 354 Enter mail, end with a single ".". javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary="=_Part_0_4932403.1165271792368" at javax.activation.ObjectDataContentHandler.writeTo (DataHandler.java :851) at javax.activation.DataHandler.writeTo(DataHandler.java:305) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1147) at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java :1607) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:390) at javax.mail.Transport.send0(Transport.java:163) at javax.mail.Transport.send(Transport.java:80) at org.apache.log4j.net.SMTPAppender.sendBuffer (Unknown Source) at org.apache.log4j.net.SMTPAppender.append(Unknown Source) at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230) at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders( AppenderAttachableImpl.java:65) at org.apache.log4j.Category.callAppenders(Category.java:203) at org.apache.log4j.Category.forcedLog(Category.java:388) at org.apache.log4j.Category.error(Category.java :302) at email.EmailTestForPost.main(EmailTestForPost.java:38) log4j:ERROR Error occured while sending e-mail notification. javax.mail.SendFailedException: Sending failed; nested exception is: class javax.mail.MessagingException: IOException while sending message; nested exception is: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary="=_Part_0_4932403.1165271792368" at javax.mail.Transport.send0(Transport.java:218) at javax.mail.Transport.send(Transport.java:80) at org.apache.log4j.net.SMTPAppender.sendBuffer(Unknown Source) at org.apache.log4j.net.SMTPAppender.append (Unknown Source) at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230) at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders (AppenderAttachableImpl.java:65) at org.apache.log4j.Category.callAppenders (Category.java:203) at org.apache.log4j.Category.forcedLog(Category.java:388) at org.apache.log4j.Category.error(Category.java:302) at email.EmailTestForPost.main(EmailTestForPost.java:38) 0 [main] ERROR EmailTest - test message body here's my code with the user/password changed. public class EmailTestForPost { static Logger log; public static void main( String[] args ) { BasicConfigurator.configure ( ); log = Logger.getLogger( "EmailTest" ); SMTPAppender sa = new SMTPAppender( ); sa.setSMTPHost( "outgoing.verizon.net " ); sa.setSMTPUsername( "[EMAIL PROTECTED]" ); sa.setSMTPPassword("password" ); sa.setFrom(" [EMAIL PROTECTED]" ); sa.setTo( "[EMAIL PROTECTED]" ); sa.setSubject( "test message" ); sa.setSMTPDebug( true ); sa.activateOptions( ); PatternLayout layout = new PatternLayout("%m"); sa.setLayout( layout); log.addAppender( sa ); log.error( "test message body" ); } } Thank you in advance, Jeff
Re: German Copy of Log4J Manual posted illegally
You should post this message directly to the author, Ceki Gulcu. Here's the book's official site: https://www.qos.ch/shop/products/log4j/log4j-Manual.jsp You can find contact information there. Jake Quoting Kamal Ahmed <[EMAIL PROTECTED]>: > Hi, > Someone has posted a German Copy of Log4J at > > www.cssrx.com:8080/resources/ebook/%5BeBook%5D%5BJava%5Dlog4j%20The%20Comple > te%20Manual.pdf > > > > - > 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: Change the log hierarchy on a log server
Instead of subclassing the Tapestry servlet(s) you could implement a Servlet Filter. see http://java.sun.com/products/servlet/Filters.html and http://www.rtner.de/software/MDCUserServletFilter.html On 12/4/06, Takács Bence <[EMAIL PROTECTED]> wrote: Unfortunately we usually use Tapestry framework, not pure servlet. So in that case we would need to override Tapestry's Application Servlet. Is there any other way to do this? What about the appenders? Or can I somehow override the root logger to do the thing? Thanks: Bence James Stauffer wrote: > AFAIK there is no way to set it in the config file so one way to set > it is to call MDC.put("server", serverName) at the beginning of every > doGet or doPost. Another option may be to have the socket server call > MDC.put("server", clientName) but I haven't tried that option. > > On 12/4/06, Bence Takács <[EMAIL PROTECTED]> wrote: >> Hello >> >> I'm sorry, I haven't used MDC before. How can I set it from the config >> (properties, or xml) file? >> >> What do you mean "at the beginning of every servlet call"? You mean >> that all my servlet has to set MDC in the doGet(), and doPost() >> methods? Could you write an example code? >> >> Thanks: >>Bence >> >> On 12/4/06, James Stauffer <[EMAIL PROTECTED]> wrote: >> > If you set the MDC at the beginning of every servlet call then most >> > errors will have it set. >> > >> > On 12/4/06, Bence Takács <[EMAIL PROTECTED]> wrote: >> > > Hello >> > > >> > > Could you express, what do you mean? In the documentation there >> is no >> > > example for managing MDC-s from config files (only for reading >> them). >> > > But I cannot change tomcat's codes, i can change it's logging >> > > properties from the logging.properties, or xml file. >> > > >> > > Could you help me, how can I manage MDC through this kinds of >> config files? >> > > >> > > Thanks: >> > >Bence >> > > >> > > >> > > On 12/4/06, Blok, Eelke <[EMAIL PROTECTED]> wrote: >> > > > I don't have experience with Log4J in Tomcat, but the usual >> solution is to make sure the originating server is in an MDC field. >> This may well be taken care of in your setup already. >> > > > >> > > > -Original Message- >> > > > From: Bence Takács [mailto:[EMAIL PROTECTED] >> > > > Sent: maandag 4 december 2006 13:33 >> > > > To: log4j-user@logging.apache.org >> > > > Subject: Change the log hierarchy on a log server >> > > > >> > > > >> > > > Hello >> > > > >> > > > I have a log server (SimpleSocketServer), which gathers all the >> log4j clients log. All the clients use their application specific >> settings, and a root logger (in ERROR level) to catch tomcat Exceptions. >> > > > >> > > > To the server the log hierarchy is like this: >> mycountry.mycompany.myapplication1 >> > > > mycountry.mycompany.myapplication2 >> > > > mycountry.mycompany.myapplication3 >> > > > org.apache.catalina >> > > > >> > > > In this way if I get a tomcat error, I don't know which server >> was the source of the exception. >> > > > >> > > > Does any way to change the logging hierarchy like this: >> myserver1.mycountry.mycompany.myapplication1 >> > > > myserver1.org.apache.catalina >> myserver2.mycountry.mycompany.myapplication2 >> > > > myserver2.org.apache.catalina >> myserver3.mycountry.mycompany.myapplication3 >> > > > myserver3.org.apache.catalina >> > > > >> > > > Thanks: >> > > > Bence >> > > > >> > > > >> - >> > > > 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] >> > > >> > > >> > >> > >> > -- >> > James Staufferhttp://www.geocities.com/stauffer_james/ >> > Are you good? Take the test at http://www.livingwaters.com/good/ >> > >> > - >> > 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: Change the log hierarchy on a log server
Unfortunately we usually use Tapestry framework, not pure servlet. So in that case we would need to override Tapestry's Application Servlet. Is there any other way to do this? What about the appenders? Or can I somehow override the root logger to do the thing? Thanks: Bence James Stauffer wrote: AFAIK there is no way to set it in the config file so one way to set it is to call MDC.put("server", serverName) at the beginning of every doGet or doPost. Another option may be to have the socket server call MDC.put("server", clientName) but I haven't tried that option. On 12/4/06, Bence Takács <[EMAIL PROTECTED]> wrote: Hello I'm sorry, I haven't used MDC before. How can I set it from the config (properties, or xml) file? What do you mean "at the beginning of every servlet call"? You mean that all my servlet has to set MDC in the doGet(), and doPost() methods? Could you write an example code? Thanks: Bence On 12/4/06, James Stauffer <[EMAIL PROTECTED]> wrote: > If you set the MDC at the beginning of every servlet call then most > errors will have it set. > > On 12/4/06, Bence Takács <[EMAIL PROTECTED]> wrote: > > Hello > > > > Could you express, what do you mean? In the documentation there is no > > example for managing MDC-s from config files (only for reading them). > > But I cannot change tomcat's codes, i can change it's logging > > properties from the logging.properties, or xml file. > > > > Could you help me, how can I manage MDC through this kinds of config files? > > > > Thanks: > >Bence > > > > > > On 12/4/06, Blok, Eelke <[EMAIL PROTECTED]> wrote: > > > I don't have experience with Log4J in Tomcat, but the usual solution is to make sure the originating server is in an MDC field. This may well be taken care of in your setup already. > > > > > > -Original Message- > > > From: Bence Takács [mailto:[EMAIL PROTECTED] > > > Sent: maandag 4 december 2006 13:33 > > > To: log4j-user@logging.apache.org > > > Subject: Change the log hierarchy on a log server > > > > > > > > > Hello > > > > > > I have a log server (SimpleSocketServer), which gathers all the log4j clients log. All the clients use their application specific settings, and a root logger (in ERROR level) to catch tomcat Exceptions. > > > > > > To the server the log hierarchy is like this: mycountry.mycompany.myapplication1 > > > mycountry.mycompany.myapplication2 > > > mycountry.mycompany.myapplication3 > > > org.apache.catalina > > > > > > In this way if I get a tomcat error, I don't know which server was the source of the exception. > > > > > > Does any way to change the logging hierarchy like this: myserver1.mycountry.mycompany.myapplication1 > > > myserver1.org.apache.catalina myserver2.mycountry.mycompany.myapplication2 > > > myserver2.org.apache.catalina myserver3.mycountry.mycompany.myapplication3 > > > myserver3.org.apache.catalina > > > > > > Thanks: > > > Bence > > > > > > - > > > 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] > > > > > > > -- > James Staufferhttp://www.geocities.com/stauffer_james/ > Are you good? Take the test at http://www.livingwaters.com/good/ > > - > 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]
German Copy of Log4J Manual posted illegally
Hi, Someone has posted a German Copy of Log4J at www.cssrx.com:8080/resources/ebook/%5BeBook%5D%5BJava%5Dlog4j%20The%20Comple te%20Manual.pdf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Change the log hierarchy on a log server
Look at PropertyFilter in log4j 1.3 alpha for an example of how you can have arbitrary static properties added to events. Also, SimplesocketServer has the ip address of the sending socketappender - you could try to use that. Scott Deboy Principal Engineer COMOTIV SYSTEMS 111 SW Columbia Street Ste. 950 Portland, OR 97201 Telephone: 503.224.7496 Cell: 503.997.1367 Fax: 503.222.0185 [EMAIL PROTECTED] www.comotivsystems.com -Original Message- From: James Stauffer [mailto:[EMAIL PROTECTED] Sent: Monday, December 04, 2006 9:20 AM To: Log4J Users List Subject: Re: Change the log hierarchy on a log server AFAIK there is no way to set it in the config file so one way to set it is to call MDC.put("server", serverName) at the beginning of every doGet or doPost. Another option may be to have the socket server call MDC.put("server", clientName) but I haven't tried that option. On 12/4/06, Bence Takács <[EMAIL PROTECTED]> wrote: > Hello > > I'm sorry, I haven't used MDC before. How can I set it from the config > (properties, or xml) file? > > What do you mean "at the beginning of every servlet call"? You mean > that all my servlet has to set MDC in the doGet(), and doPost() > methods? Could you write an example code? > > Thanks: >Bence > > On 12/4/06, James Stauffer <[EMAIL PROTECTED]> wrote: > > If you set the MDC at the beginning of every servlet call then most > > errors will have it set. > > > > On 12/4/06, Bence Takács <[EMAIL PROTECTED]> wrote: > > > Hello > > > > > > Could you express, what do you mean? In the documentation there is no > > > example for managing MDC-s from config files (only for reading them). > > > But I cannot change tomcat's codes, i can change it's logging > > > properties from the logging.properties, or xml file. > > > > > > Could you help me, how can I manage MDC through this kinds of config > > > files? > > > > > > Thanks: > > >Bence > > > > > > > > > On 12/4/06, Blok, Eelke <[EMAIL PROTECTED]> wrote: > > > > I don't have experience with Log4J in Tomcat, but the usual solution is > > > > to make sure the originating server is in an MDC field. This may well > > > > be taken care of in your setup already. > > > > > > > > -Original Message- > > > > From: Bence Takács [mailto:[EMAIL PROTECTED] > > > > Sent: maandag 4 december 2006 13:33 > > > > To: log4j-user@logging.apache.org > > > > Subject: Change the log hierarchy on a log server > > > > > > > > > > > > Hello > > > > > > > > I have a log server (SimpleSocketServer), which gathers all the log4j > > > > clients log. All the clients use their application specific settings, > > > > and a root logger (in ERROR level) to catch tomcat Exceptions. > > > > > > > > To the server the log hierarchy is like this: > > > > mycountry.mycompany.myapplication1 > > > > mycountry.mycompany.myapplication2 > > > > mycountry.mycompany.myapplication3 > > > > org.apache.catalina > > > > > > > > In this way if I get a tomcat error, I don't know which server was the > > > > source of the exception. > > > > > > > > Does any way to change the logging hierarchy like this: > > > > myserver1.mycountry.mycompany.myapplication1 > > > > myserver1.org.apache.catalina > > > > myserver2.mycountry.mycompany.myapplication2 > > > > myserver2.org.apache.catalina > > > > myserver3.mycountry.mycompany.myapplication3 > > > > myserver3.org.apache.catalina > > > > > > > > Thanks: > > > > Bence > > > > > > > > - > > > > 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] > > > > > > > > > > > > -- > > James Staufferhttp://www.geocities.com/stauffer_james/ > > Are you good? Take the test at http://www.livingwaters.com/good/ > > > > - > > 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] > > -- James Staufferhttp://www.geocities.com/stauffer_james/ Are you good? Take the test at http://www.livingwaters.com/good/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma
Re: Change the log hierarchy on a log server
AFAIK there is no way to set it in the config file so one way to set it is to call MDC.put("server", serverName) at the beginning of every doGet or doPost. Another option may be to have the socket server call MDC.put("server", clientName) but I haven't tried that option. On 12/4/06, Bence Takács <[EMAIL PROTECTED]> wrote: Hello I'm sorry, I haven't used MDC before. How can I set it from the config (properties, or xml) file? What do you mean "at the beginning of every servlet call"? You mean that all my servlet has to set MDC in the doGet(), and doPost() methods? Could you write an example code? Thanks: Bence On 12/4/06, James Stauffer <[EMAIL PROTECTED]> wrote: > If you set the MDC at the beginning of every servlet call then most > errors will have it set. > > On 12/4/06, Bence Takács <[EMAIL PROTECTED]> wrote: > > Hello > > > > Could you express, what do you mean? In the documentation there is no > > example for managing MDC-s from config files (only for reading them). > > But I cannot change tomcat's codes, i can change it's logging > > properties from the logging.properties, or xml file. > > > > Could you help me, how can I manage MDC through this kinds of config files? > > > > Thanks: > >Bence > > > > > > On 12/4/06, Blok, Eelke <[EMAIL PROTECTED]> wrote: > > > I don't have experience with Log4J in Tomcat, but the usual solution is to make sure the originating server is in an MDC field. This may well be taken care of in your setup already. > > > > > > -Original Message- > > > From: Bence Takács [mailto:[EMAIL PROTECTED] > > > Sent: maandag 4 december 2006 13:33 > > > To: log4j-user@logging.apache.org > > > Subject: Change the log hierarchy on a log server > > > > > > > > > Hello > > > > > > I have a log server (SimpleSocketServer), which gathers all the log4j clients log. All the clients use their application specific settings, and a root logger (in ERROR level) to catch tomcat Exceptions. > > > > > > To the server the log hierarchy is like this: mycountry.mycompany.myapplication1 > > > mycountry.mycompany.myapplication2 > > > mycountry.mycompany.myapplication3 > > > org.apache.catalina > > > > > > In this way if I get a tomcat error, I don't know which server was the source of the exception. > > > > > > Does any way to change the logging hierarchy like this: myserver1.mycountry.mycompany.myapplication1 > > > myserver1.org.apache.catalina myserver2.mycountry.mycompany.myapplication2 > > > myserver2.org.apache.catalina myserver3.mycountry.mycompany.myapplication3 > > > myserver3.org.apache.catalina > > > > > > Thanks: > > > Bence > > > > > > - > > > 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] > > > > > > > -- > James Staufferhttp://www.geocities.com/stauffer_james/ > Are you good? Take the test at http://www.livingwaters.com/good/ > > - > 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] -- James Staufferhttp://www.geocities.com/stauffer_james/ Are you good? Take the test at http://www.livingwaters.com/good/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Change the log hierarchy on a log server
Hello I'm sorry, I haven't used MDC before. How can I set it from the config (properties, or xml) file? What do you mean "at the beginning of every servlet call"? You mean that all my servlet has to set MDC in the doGet(), and doPost() methods? Could you write an example code? Thanks: Bence On 12/4/06, James Stauffer <[EMAIL PROTECTED]> wrote: If you set the MDC at the beginning of every servlet call then most errors will have it set. On 12/4/06, Bence Takács <[EMAIL PROTECTED]> wrote: > Hello > > Could you express, what do you mean? In the documentation there is no > example for managing MDC-s from config files (only for reading them). > But I cannot change tomcat's codes, i can change it's logging > properties from the logging.properties, or xml file. > > Could you help me, how can I manage MDC through this kinds of config files? > > Thanks: >Bence > > > On 12/4/06, Blok, Eelke <[EMAIL PROTECTED]> wrote: > > I don't have experience with Log4J in Tomcat, but the usual solution is to make sure the originating server is in an MDC field. This may well be taken care of in your setup already. > > > > -Original Message- > > From: Bence Takács [mailto:[EMAIL PROTECTED] > > Sent: maandag 4 december 2006 13:33 > > To: log4j-user@logging.apache.org > > Subject: Change the log hierarchy on a log server > > > > > > Hello > > > > I have a log server (SimpleSocketServer), which gathers all the log4j clients log. All the clients use their application specific settings, and a root logger (in ERROR level) to catch tomcat Exceptions. > > > > To the server the log hierarchy is like this: mycountry.mycompany.myapplication1 > > mycountry.mycompany.myapplication2 > > mycountry.mycompany.myapplication3 > > org.apache.catalina > > > > In this way if I get a tomcat error, I don't know which server was the source of the exception. > > > > Does any way to change the logging hierarchy like this: myserver1.mycountry.mycompany.myapplication1 > > myserver1.org.apache.catalina myserver2.mycountry.mycompany.myapplication2 > > myserver2.org.apache.catalina myserver3.mycountry.mycompany.myapplication3 > > myserver3.org.apache.catalina > > > > Thanks: > > Bence > > > > - > > 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] > > -- James Staufferhttp://www.geocities.com/stauffer_james/ Are you good? Take the test at http://www.livingwaters.com/good/ - 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: Change the log hierarchy on a log server
If you set the MDC at the beginning of every servlet call then most errors will have it set. On 12/4/06, Bence Takács <[EMAIL PROTECTED]> wrote: Hello Could you express, what do you mean? In the documentation there is no example for managing MDC-s from config files (only for reading them). But I cannot change tomcat's codes, i can change it's logging properties from the logging.properties, or xml file. Could you help me, how can I manage MDC through this kinds of config files? Thanks: Bence On 12/4/06, Blok, Eelke <[EMAIL PROTECTED]> wrote: > I don't have experience with Log4J in Tomcat, but the usual solution is to make sure the originating server is in an MDC field. This may well be taken care of in your setup already. > > -Original Message- > From: Bence Takács [mailto:[EMAIL PROTECTED] > Sent: maandag 4 december 2006 13:33 > To: log4j-user@logging.apache.org > Subject: Change the log hierarchy on a log server > > > Hello > > I have a log server (SimpleSocketServer), which gathers all the log4j clients log. All the clients use their application specific settings, and a root logger (in ERROR level) to catch tomcat Exceptions. > > To the server the log hierarchy is like this: mycountry.mycompany.myapplication1 > mycountry.mycompany.myapplication2 > mycountry.mycompany.myapplication3 > org.apache.catalina > > In this way if I get a tomcat error, I don't know which server was the source of the exception. > > Does any way to change the logging hierarchy like this: myserver1.mycountry.mycompany.myapplication1 > myserver1.org.apache.catalina myserver2.mycountry.mycompany.myapplication2 > myserver2.org.apache.catalina myserver3.mycountry.mycompany.myapplication3 > myserver3.org.apache.catalina > > Thanks: > Bence > > - > 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] -- James Staufferhttp://www.geocities.com/stauffer_james/ Are you good? Take the test at http://www.livingwaters.com/good/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Change the log hierarchy on a log server
Hello Could you express, what do you mean? In the documentation there is no example for managing MDC-s from config files (only for reading them). But I cannot change tomcat's codes, i can change it's logging properties from the logging.properties, or xml file. Could you help me, how can I manage MDC through this kinds of config files? Thanks: Bence On 12/4/06, Blok, Eelke <[EMAIL PROTECTED]> wrote: I don't have experience with Log4J in Tomcat, but the usual solution is to make sure the originating server is in an MDC field. This may well be taken care of in your setup already. -Original Message- From: Bence Takács [mailto:[EMAIL PROTECTED] Sent: maandag 4 december 2006 13:33 To: log4j-user@logging.apache.org Subject: Change the log hierarchy on a log server Hello I have a log server (SimpleSocketServer), which gathers all the log4j clients log. All the clients use their application specific settings, and a root logger (in ERROR level) to catch tomcat Exceptions. To the server the log hierarchy is like this: mycountry.mycompany.myapplication1 mycountry.mycompany.myapplication2 mycountry.mycompany.myapplication3 org.apache.catalina In this way if I get a tomcat error, I don't know which server was the source of the exception. Does any way to change the logging hierarchy like this: myserver1.mycountry.mycompany.myapplication1 myserver1.org.apache.catalina myserver2.mycountry.mycompany.myapplication2 myserver2.org.apache.catalina myserver3.mycountry.mycompany.myapplication3 myserver3.org.apache.catalina Thanks: Bence - 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: Change the log hierarchy on a log server
I don't have experience with Log4J in Tomcat, but the usual solution is to make sure the originating server is in an MDC field. This may well be taken care of in your setup already. -Original Message- From: Bence Takács [mailto:[EMAIL PROTECTED] Sent: maandag 4 december 2006 13:33 To: log4j-user@logging.apache.org Subject: Change the log hierarchy on a log server Hello I have a log server (SimpleSocketServer), which gathers all the log4j clients log. All the clients use their application specific settings, and a root logger (in ERROR level) to catch tomcat Exceptions. To the server the log hierarchy is like this: mycountry.mycompany.myapplication1 mycountry.mycompany.myapplication2 mycountry.mycompany.myapplication3 org.apache.catalina In this way if I get a tomcat error, I don't know which server was the source of the exception. Does any way to change the logging hierarchy like this: myserver1.mycountry.mycompany.myapplication1 myserver1.org.apache.catalina myserver2.mycountry.mycompany.myapplication2 myserver2.org.apache.catalina myserver3.mycountry.mycompany.myapplication3 myserver3.org.apache.catalina Thanks: Bence - 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]
Change the log hierarchy on a log server
Hello I have a log server (SimpleSocketServer), which gathers all the log4j clients log. All the clients use their application specific settings, and a root logger (in ERROR level) to catch tomcat Exceptions. To the server the log hierarchy is like this: mycountry.mycompany.myapplication1 mycountry.mycompany.myapplication2 mycountry.mycompany.myapplication3 org.apache.catalina In this way if I get a tomcat error, I don't know which server was the source of the exception. Does any way to change the logging hierarchy like this: myserver1.mycountry.mycompany.myapplication1 myserver1.org.apache.catalina myserver2.mycountry.mycompany.myapplication2 myserver2.org.apache.catalina myserver3.mycountry.mycompany.myapplication3 myserver3.org.apache.catalina Thanks: Bence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]