Re: Adding new tags to log4j XML configuration file
Hello I made a logserver too, and looking for a solution for merging my configurations and the standard log4j configuration for the logserver. So I'd like to modify the log4j config schema or dtd too. What did you find out about it? Thanks: Bence Mattias Andersson wrote: Hi, I'm using log4j 1.2.14 and I'd like to add my own tags to the log4j XML configuration file. The reason for this is that we have built a logging server and to avoid having two configuration files I'd like to add some new tags to XML file. I've added the following to my XML file and the parser generates (correctly) a waring about redefinition of log4j:configuration DTD element. The parsing of the XML file works fine anyway it's just the warning I'd like to avoid since users tends to notice warnings and ask questions. Perhaps this warning can be turned of? ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE log4j:configuration SYSTEM log4j.dtd [ !ELEMENT log4j:configuration (renderer*, appender*,(category|logger)*,root?, categoryFactory?, server) !ELEMENT server EMPTY !ATTLIST server portCDATA #REQUIRED ] log4j:WARN Continuable parsing error 12 and column 50 log4j:WARN Element type log4j:configuration must not be declared more than once. I'm not an expert on DTD but it should be possible to write the log4j.dtd so that you can add your own tags, or? Or have someone extended the XML file and solved it in another way? Any help or pointers would be appreciated. Regards /Mattias - 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: creating log files which are readable for Chainsaw
Thanks, I've solved the problem. It seems that both the SocketAppender and the XmlAppender needs to turn on the LocationInfo in their config files to send and catch the LocationInfo... Bence Scott Deboy wrote: Add a consoleappender to the socketserver config which prints line, method, etc. via patternlayout patterns. If you see it there, you should be able to get it into the xml files. Scott Deboy 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: Takács Bence [mailto:[EMAIL PROTECTED] Sent: Wed 12/13/2006 10:41 AM To: Log4J Users List Subject: creating log files which are readable for Chainsaw Hello I use a SocketServer to collect the logs to a server, then I store them into files. I use XmlLayout for formatting. If I watch the files with Chainsaw, the Class, Method, Line, MDC fields are empty, even though the are in present on the clients console. I haven't find theese values in the XML file either. I don't think that the SocketAppender would be responsible for the vanishing, so I think that the XMLLayout mess up the datas somehow. My question is: how can I config the SocketServer to make a file which consists theese values and is readable with Chainsaw? In general: How (with which pattern configuration) can I make files which consists theese values and is readable with Chainsaw? 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: creating log files which are readable for Chainsaw
Well, I've checked my Log config on the clients and found: log4j.appender.tcp.LocationInfo=true So, the SocketAppender sets the LocationInfo for Logging event before serializing. But until serializing the varibles become null because they are transparent... May I misunderstood something? Is it a conception not to send LocationInfo through the lan, or what? Thanks: Bence Takács Bence wrote: Sorry, I've just read the source and it turned out that filename, methodname, classname and linenumber variables in the object LocationInfo are transparent. That mean that when they are being serialized they lost their values... And the SocketAppender serializes the Objects to send through tcp. But why is it required? I would need theese variables on the server too (in addition I miss a static hostName field from the LocationInfo). I don't understand the concept... Or maybe i misunderstood something... Regards: Bence Takács Bence wrote: Hello I use a SocketServer to collect the logs to a server, then I store them into files. I use XmlLayout for formatting. If I watch the files with Chainsaw, the Class, Method, Line, MDC fields are empty, even though the are in present on the clients console. I haven't find theese values in the XML file either. I don't think that the SocketAppender would be responsible for the vanishing, so I think that the XMLLayout mess up the datas somehow. My question is: how can I config the SocketServer to make a file which consists theese values and is readable with Chainsaw? In general: How (with which pattern configuration) can I make files which consists theese values and is readable with Chainsaw? 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: creating log files which are readable for Chainsaw
Well, I've checked my Log config on the clients and found: log4j.appender.tcp.LocationInfo=true So, the SocketAppender sets the Locationinfo for Logging event before serializing. But until serializing the varibles become null because they are transparent... May I misunderstood something? Is it a conception not to send LocationInfo through the lan, or what? Thanks: Bence Takács Bence wrote: Sorry, I've just read the source and it turned out that filename, methodname, classname and linenumber variables in the object LocationInfo are transparent. That mean that when they are being serialized they lost their values... And the SocketAppender serializes the Objects to send through tcp. But why is it required? I would need theese variables on the server too (in addition I miss a static hostName field from the LocationInfo). I don't understand the concept... Or maybe i misunderstood something... Regards: Bence Takács Bence wrote: Hello I use a SocketServer to collect the logs to a server, then I store them into files. I use XmlLayout for formatting. If I watch the files with Chainsaw, the Class, Method, Line, MDC fields are empty, even though the are in present on the clients console. I haven't find theese values in the XML file either. I don't think that the SocketAppender would be responsible for the vanishing, so I think that the XMLLayout mess up the datas somehow. My question is: how can I config the SocketServer to make a file which consists theese values and is readable with Chainsaw? In general: How (with which pattern configuration) can I make files which consists theese values and is readable with Chainsaw? 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: different config files for different tomcat applications
Well, I've tried, but I have some bugs... I deployed two applications, both with their own log4j.jar, and properties file, and I put an other to ${catalina.home}/common/classes, and ${catalina.home}/common/lib. It seems to be working except the following bugs: 1. INFO: Starting Servlet Engine: Apache Tomcat/5.5.17 Aug 16, 2006 6:01:55 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax). log4j:WARN Please initialize the log4j system properly. 2. If i set rootLogger for any of the applications, it won't log anything 3. The common log4j logs only the tomcat logs and can't see the servlet's logs (this is because of the classloader) 4. the app's loggers don't log their own hivemind services' logs so it seems that they can't see them I've tried the log4j from both commons and shared, but it didn't work When I tried to use log4j from ${catalina.home}/shared only, I recognized, that all of the hivemind services' logs seems to have ${module_id}.${service_id} classpath. And if the service has been called, it creates a log: Constructing core service implementation for service x.y Does anybody know something about hivemind? Does it make its own implementation of services really? Because this is my only explanation for the phenomena written above. Jacob Kjome wrote: Quoting James Stauffer [EMAIL PROTECTED]: On 8/15/06, Takacs Bence [EMAIL PROTECTED] wrote: 1. Only have log4j.properties and log4j.jar under tomcat/shared or tomcat/common What do you mean 'or'??? Two directories for two different functions. One for tomcat 'inner' configuration (tomcat/common), and one for 'applications' configuration (tomcat/shared). As far as I know they are not in 'or' relation... Maybe I can put only one log4j.jar, but what about the properties file??? I adminit that I don't know the difference between those two directories but I have my log4j.jar in tomcat/common and the apps can access log4j classes just fine. Basically for this option I meant to put it in a directory so that it is in both the classpath for both tomcat and the apps. shared/classes is seen by apps. common/classes is seen by both Tomcat and apps. As far as apps are concerned, though, I wouldn't bet the farm on an app using log4j.properties from one or the other. It would all depend on what gets placed first in the classpath. If you have it in common/classes for Tomcat's sake, I shared/classes is not a proper place to put another copy for apps' sake. WEB-INF/classes is the place to put them... as long as you also put log4j.jar in WEB-INF/lib at the same time. The reason why this works (for Tomcat standalone) is that Tomcat implements child-first classloading. If you run Tomcat under, for instance, JBoss however, you cannot count on this. Is Log4j such sensitive??? Or am I the one who doesn't understand the point? You need to be aware of how classloaders work to understand why Log4j can't help but do what it is doing. It's not a bug. We all get your point. In any case, it should work, as long as you are using Tomcat standalone with its default behavior of child-first classloading when you have your config file in WEB-INF/classes and log4j.jar in WEB-INF/lib. Even if you have log4j.properties in common/classes or shared/classes, then one in WEB-INF/classes should take precedence. The fact that you are finding it doesn't leads me to one of two conclusions... 1. You aren't using Tomcat standalone, but Tomcat integrated with JBoss or some IDE that is changing the default classloading behavior for child-first to parent-first. 2. There *is* a log4j.xml file somewhere out there hiding in some jar file that you are unaware of. Log4j is using it instead of log4j.properties. For this reason, I implore you to use a log4j.xml file if for no other reason than to rule out this possibility. Basically you can have only 1 config file and 1 log4j.jar in the classpath. No, per distinct classloader. The log4j core classes only try to configure themselves once so you only want 1 log4j.jar and 1 log4j config file in the classpath. Again, per distinct clasloader. If you have multiple then it might not use the config file that you expect. ditto what I said two times already. Since the app server has different classpaths for different parts you end up with these options for where you want the log4j files. Ahh... I think you are using classpath to mean classloader. Ok. Basically, what you have said is correct. Just need to distinguish classpath from classloader. Jake Try running with -Dlog4j.debug. That should give you more info about the problem. It is a command line option so that depends on how you run Tomcat. I put it in the Java tab of the Configure Tomcat applicaton. So I'have called catalina with theese switch. And then? I experienced nothing different... When you use
lifesigns
Hello Is there a possibility for listerning to an application's 'lifesign'? I mean: send an email or other message, if there is no log from that application in the recent 10 minutes? Thanks: Bence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
network using appenders when network is down
Hello Our servers have small storage, so I don't want to use FileAppender. What can I do if the LAN is down and my appender wants to send an email or send a Socket message? The buffer will be deleted if the server will reboot, and additionally I don't know what is the physical limit for buffer size. Or is there any possibility to say to log4j: if you can send the messages:send; if not: call the daily rolling appender? Because in this case I could write an other application, which looks for log files in every reboot, send the content with some kind of network appender, and delete the log files. Thanks: Bence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: network using appenders when network is down
a possible solution for not lossing messages in case of LAN being down would be to use an other appender (FileAppender) in such cases. Either you check if there is network connection and continue as usually, if there is, or use a FileAppender in case of a problem, either you subclass the needed appender and handle the problem inside your appender. And how can I check the networking and call the suitable appender without writing my own appender? Is there any possibility to make this ckeck from log4j configuration (properties or xml file)? Or maybe I can catch the exception of SocketAppender somehow... Thanks: Bence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: different config files for different tomcat applications
Try running with -Dlog4j.debug. That should give you more info about the problem. Where should I put this switch? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: different config files for different tomcat applications
No log4j.xml, and only the two log4j.properties: - one in the /tomcat/shared/classes for tomcat inner logs - one in the /tomcat/common/classes for tomcat applications logs I make both of them after the error message... Thanks: Bence Jacob Kjome wrote: Is there a log4j.xml anywhere on the classpath (in the default package, that is)? Look in directories and jars. I would suggest changing to an XML config file because Log4j looks for it first. If it doesn't find log4j.xml, then it looks for log4j.properties. I've seen this happen so often to users that it is the first thing I ask them. Jake Quoting James Stauffer [EMAIL PROTECTED]: Try running with -Dlog4j.debug. That should give you more info about the problem. On 8/14/06, Takacs Bence [EMAIL PROTECTED] wrote: No James Stauffer wrote: Is there a log4j.jar under shared or common? On 8/14/06, Takacs Bence [EMAIL PROTECTED] wrote: I _only_ moved log4j.properties from shared/classes to two different webapps/app/WEB-INF/classes directory. In other words I deleted the original file and made two different copies (with the required modifications of course). Both projects has it's own log4j.jar too. Thanks: Bence James Stauffer wrote: Did you move log4j.properties also? You will need to do that too. On 8/14/06, Takacs Bence [EMAIL PROTECTED] wrote: Hello James Stauffer wrote: I meant different config files. If you move the lib/log4j.jar and classes/log4j.properties from the shared classpath (i.e. tomcat/common) to each webapp (i.e. webapps/app/WEB-INF) then each app will use a separate config file. I deleted the common /tomcat/shared/classes/log4j.properties, and put different properties file to the different projects (webapps/app/WEB-INF/classes). But it seems that only one send logs out of it. I can't get the other one's logs neither on the console nor on ftp. Maybe on tcp it could be problem that I set the same port for the two appenders but what about the console??? Any idea? 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 Stauffer 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: different config files for different tomcat applications
Takacs Bence wrote: Try running with -Dlog4j.debug. That should give you more info about the problem. Where should I put this switch? Maybe when I run Catalina? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: different config files for different tomcat applications
1. Only have log4j.properties and log4j.jar under tomcat/shared or tomcat/common What do you mean 'or'??? Two directories for two different functions. One for tomcat 'inner' configuration (tomcat/common), and one for 'applications' configuration (tomcat/shared). As far as I know they are not in 'or' relation... Maybe I can put only one log4j.jar, but what about the properties file??? Is Log4j such sensitive??? Or am I the one who doesn't understand the point? Try running with -Dlog4j.debug. That should give you more info about the problem. It is a command line option so that depends on how you run Tomcat. I put it in the Java tab of the Configure Tomcat applicaton. So I'have called catalina with theese switch. And then? I experienced nothing different... Thanks: Bence James Stauffer wrote: I don't think it will work to have log4j.jar under webapps/app/WEB-INF/lib and expect those locations of log4j.properties to be used. You have 2 choices that I know will work: 1. Only have log4j.properties and log4j.jar under tomcat/shared or tomcat/common 2. Only have log4j.properties and log4j.jar under webapps/app/WEB-INF For #2 you might be able to put log4j.properties and log4j.jar someplace that tomcat can see them but not the apps (server?). On 8/15/06, Takacs Bence [EMAIL PROTECTED] wrote: No log4j.xml, and only the two log4j.properties: - one in the /tomcat/shared/classes for tomcat inner logs - one in the /tomcat/common/classes for tomcat applications logs I make both of them after the error message... Thanks: Bence Jacob Kjome wrote: Is there a log4j.xml anywhere on the classpath (in the default package, that is)? Look in directories and jars. I would suggest changing to an XML config file because Log4j looks for it first. If it doesn't find log4j.xml, then it looks for log4j.properties. I've seen this happen so often to users that it is the first thing I ask them. Jake Quoting James Stauffer [EMAIL PROTECTED]: Try running with -Dlog4j.debug. That should give you more info about the problem. On 8/14/06, Takacs Bence [EMAIL PROTECTED] wrote: No James Stauffer wrote: Is there a log4j.jar under shared or common? On 8/14/06, Takacs Bence [EMAIL PROTECTED] wrote: I _only_ moved log4j.properties from shared/classes to two different webapps/app/WEB-INF/classes directory. In other words I deleted the original file and made two different copies (with the required modifications of course). Both projects has it's own log4j.jar too. Thanks: Bence James Stauffer wrote: Did you move log4j.properties also? You will need to do that too. On 8/14/06, Takacs Bence [EMAIL PROTECTED] wrote: Hello James Stauffer wrote: I meant different config files. If you move the lib/log4j.jar and classes/log4j.properties from the shared classpath (i.e. tomcat/common) to each webapp (i.e. webapps/app/WEB-INF) then each app will use a separate config file. I deleted the common /tomcat/shared/classes/log4j.properties, and put different properties file to the different projects (webapps/app/WEB-INF/classes). But it seems that only one send logs out of it. I can't get the other one's logs neither on the console nor on ftp. Maybe on tcp it could be problem that I set the same port for the two appenders but what about the console??? Any idea? 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 Stauffer 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problems with SMTPAppender under tomcat
I meant different config files. If you move the lib/log4j.jar and classes/log4j.properties from the shared classpath (i.e. tomcat/common) to each webapp (i.e. webapps/app/WEB-INF) then each app will use a separate config file. ...but If you want all projects to use the same config then you are grouping them together logically. How? You are telling them all to use the same config so you are having them all use the same log4j instance. So, my question is: if there is no common config file in the tomcat/shared/classes how can I tell different projects to use a common config? How can I tell them? Thanks: Bence You said, that I can use James Stauffer wrote: I don't understand your question. How what? How to use separate config files? On 8/11/06, Takacs Bence [EMAIL PROTECTED] wrote: OK, but technically how? from config file? can the config file make a reference to an other config file? what is the syntax of this command? Thanks: Bence James Stauffer wrote: On 8/11/06, Takacs Bence [EMAIL PROTECTED] wrote: If you want all projects to use the same config then you are grouping them together logically. How? You are telling them all to use the same config so you are having them all use the same log4j instance. - 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]
different config files for different tomcat applications
Hello James Stauffer wrote: I meant different config files. If you move the lib/log4j.jar and classes/log4j.properties from the shared classpath (i.e. tomcat/common) to each webapp (i.e. webapps/app/WEB-INF) then each app will use a separate config file. I deleted the common /tomcat/shared/classes/log4j.properties, and put different properties file to the different projects (webapps/app/WEB-INF/classes). But it seems that only one send logs out of it. I can't get the other one's logs neither on the console nor on ftp. Maybe on tcp it could be problem that I set the same port for the two appenders but what about the console??? Any idea? Thanks: Bence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
xml vs. properties
Hello Why everybody use xml file instead of properties file? It's twice as much typing as the properties file... Does it have any additional function? Or is there a kind of editor which makes it easier to use? Thanks: Bence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: different config files for different tomcat applications
Well, sometimes neither of them writes the log, sometimes both of them uses the SocketAppender... As if in every tomcat restart it would have throw a dice... the only message: log4j:WARN No appenders could be found for logger (org.apache.commons.digester.D igester.sax). log4j:WARN Please initialize the log4j system properly. log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax). log4j:WARN Please initialize the log4j system properly. Aug 14, 2006 3:37:01 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Aug 14, 2006 3:37:01 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Aug 14, 2006 3:37:01 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/24 config=null Aug 14, 2006 3:37:01 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource and recently tomcat has crashed twice... Thanks: Bence Takacs Bence wrote: Hello James Stauffer wrote: I meant different config files. If you move the lib/log4j.jar and classes/log4j.properties from the shared classpath (i.e. tomcat/common) to each webapp (i.e. webapps/app/WEB-INF) then each app will use a separate config file. I deleted the common /tomcat/shared/classes/log4j.properties, and put different properties file to the different projects (webapps/app/WEB-INF/classes). But it seems that only one send logs out of it. I can't get the other one's logs neither on the console nor on ftp. Maybe on tcp it could be problem that I set the same port for the two appenders but what about the console??? Any idea? 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]
tomcat with log4j?
Hello I'm using log4j, but tomcat seems to use the sun java logger. Are there any way to catch its logs, or make it use log4j instead? Thanks: Bence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: different config files for different tomcat applications
I _only_ moved log4j.properties from shared/classes to two different webapps/app/WEB-INF/classes directory. In other words I deleted the original file and made two different copies (with the required modifications of course). Both projects has it's own log4j.jar too. Thanks: Bence James Stauffer wrote: Did you move log4j.properties also? You will need to do that too. On 8/14/06, Takacs Bence [EMAIL PROTECTED] wrote: Hello James Stauffer wrote: I meant different config files. If you move the lib/log4j.jar and classes/log4j.properties from the shared classpath (i.e. tomcat/common) to each webapp (i.e. webapps/app/WEB-INF) then each app will use a separate config file. I deleted the common /tomcat/shared/classes/log4j.properties, and put different properties file to the different projects (webapps/app/WEB-INF/classes). But it seems that only one send logs out of it. I can't get the other one's logs neither on the console nor on ftp. Maybe on tcp it could be problem that I set the same port for the two appenders but what about the console??? Any idea? 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]
Re: different config files for different tomcat applications
No James Stauffer wrote: Is there a log4j.jar under shared or common? On 8/14/06, Takacs Bence [EMAIL PROTECTED] wrote: I _only_ moved log4j.properties from shared/classes to two different webapps/app/WEB-INF/classes directory. In other words I deleted the original file and made two different copies (with the required modifications of course). Both projects has it's own log4j.jar too. Thanks: Bence James Stauffer wrote: Did you move log4j.properties also? You will need to do that too. On 8/14/06, Takacs Bence [EMAIL PROTECTED] wrote: Hello James Stauffer wrote: I meant different config files. If you move the lib/log4j.jar and classes/log4j.properties from the shared classpath (i.e. tomcat/common) to each webapp (i.e. webapps/app/WEB-INF) then each app will use a separate config file. I deleted the common /tomcat/shared/classes/log4j.properties, and put different properties file to the different projects (webapps/app/WEB-INF/classes). But it seems that only one send logs out of it. I can't get the other one's logs neither on the console nor on ftp. Maybe on tcp it could be problem that I set the same port for the two appenders but what about the console??? Any idea? 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]
problems with chainsaw
Hello I've tried to use chainsaw with zeroconf. I put the jars into the projects Build Path, and attached the zeroconf appender to the project. It throw the following exception: Aug 11, 2006 12:15:50 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.5.0_07/jre/lib/i386/client:/usr/java/jdk1.5.0_07/jre/lib/i386:/usr/java/jdk1.5.0_07/jre/../lib/i386:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib: Aug 11, 2006 12:15:50 PM org.apache.coyote.http11.Http11BaseProtocol init SEVERE: Error initializing endpoint java.net.BindException: Address already in use:8080 at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297) at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:138) at org.apache.catalina.connector.Connector.initialize(Connector.java:1016) at org.apache.catalina.core.StandardService.initialize(StandardService.java:580) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791) at org.apache.catalina.startup.Catalina.load(Catalina.java:503) at org.apache.catalina.startup.Catalina.load(Catalina.java:523) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431) Aug 11, 2006 12:15:50 PM org.apache.catalina.startup.Catalina load SEVERE: Catalina.start LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use:8080 at org.apache.catalina.connector.Connector.initialize(Connector.java:1018) at org.apache.catalina.core.StandardService.initialize(StandardService.java:580) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791) at org.apache.catalina.startup.Catalina.load(Catalina.java:503) at org.apache.catalina.startup.Catalina.load(Catalina.java:523) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431) ... Aug 11, 2006 12:15:50 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled log4j:ERROR Could not instantiate class [org.apache.log4j.net.ZeroConfSocketHubAppender]. java.lang.ClassNotFoundException: org.apache.log4j.net.ZeroConfSocketHubAppender at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at org.apache.log4j.helpers.Loader.loadClass(Loader.java:160) at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:309) at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:112) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:620) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603) at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:524) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:408) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:432) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460) at org.apache.log4j.LogManager.clinit(LogManager.java:113) at org.apache.log4j.Logger.getLogger(Logger.java:85) at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:229) at org.apache.commons.logging.impl.Log4JLogger.init(Log4JLogger.java:65) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at
Re: problems with chainsaw
Hello I'm sorry, it was because the catalina was stucked in the memory. Now, it's OK. No error message, but I don't see the logs in the chainsaw. What kind of configuration do I need? For the ZeroconfAppender and for chainsaw. I use Linux, and run the tomcat on localhost. I use the following lines in the log4j.properties file: log4j.logger.hu.watt22.wde22.cc=DEBUG, zeroconf log4j.appender.zeroconf=org.apache.log4j.net.ZeroConfSocketHubAppender And use Java Web Start Chainsaw with the SocketReceiver on Port 445. Is it enough? What else do I need? Thanks: Bence Takacs Bence wrote: Hello I've tried to use chainsaw with zeroconf. I put the jars into the projects Build Path, and attached the zeroconf appender to the project. It throw the following exception: Aug 11, 2006 12:15:50 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.5.0_07/jre/lib/i386/client:/usr/java/jdk1.5.0_07/jre/lib/i386:/usr/java/jdk1.5.0_07/jre/../lib/i386:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib: Aug 11, 2006 12:15:50 PM org.apache.coyote.http11.Http11BaseProtocol init SEVERE: Error initializing endpoint java.net.BindException: Address already in use:8080 at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297) at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:138) at org.apache.catalina.connector.Connector.initialize(Connector.java:1016) at org.apache.catalina.core.StandardService.initialize(StandardService.java:580) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791) at org.apache.catalina.startup.Catalina.load(Catalina.java:503) at org.apache.catalina.startup.Catalina.load(Catalina.java:523) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431) Aug 11, 2006 12:15:50 PM org.apache.catalina.startup.Catalina load SEVERE: Catalina.start LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use:8080 at org.apache.catalina.connector.Connector.initialize(Connector.java:1018) at org.apache.catalina.core.StandardService.initialize(StandardService.java:580) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791) at org.apache.catalina.startup.Catalina.load(Catalina.java:503) at org.apache.catalina.startup.Catalina.load(Catalina.java:523) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431) ... Aug 11, 2006 12:15:50 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled log4j:ERROR Could not instantiate class [org.apache.log4j.net.ZeroConfSocketHubAppender]. java.lang.ClassNotFoundException: org.apache.log4j.net.ZeroConfSocketHubAppender at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at org.apache.log4j.helpers.Loader.loadClass(Loader.java:160) at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:309) at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:112) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:620) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603) at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:524) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:408) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:432) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure
Re: problems with SMTPAppender under tomcat
Hello The projekt uses the configuration, but has no SMPTAppender attached to it. You mean, that if it use a config in which I call an appender: every package I use should meet the requirements of that appender? This would mean that all my projects would use the mail.api and activation.jar because I attached the SMTPAppender to one of them. This would be weird. Thanks: Bence James Stauffer wrote: If a project that doesn't need to send email uses a log4j config that includes an SMPTAppender log4j still needs to configure that appender so it needs mail.jar and activation.jar. You don't want to have 2 copies of the same jar in the classpath twice. On 8/11/06, Takacs Bence [EMAIL PROTECTED] wrote: Hello I've found a solution on the net: Deleted all tomcat projects includes the mail.jar, and copied the mail.jar and activation.jar to the /tomcat/shared/lib, and everything looks fine. But WHY??? It has solved the problem, but it's not a real solution. The problem remained unrevealed. My questions: - Why does a package , which doesn't need to send a mail throws an AddressException - Why is it problem if I have different projects with mail.jar, and activation.jar? And how can I use them regularly (without exceptions)? Any ideas? Thanks: Bence Takacs Bence wrote: Greetings I've been using log4j for a couple of weeks with tapestry framework, on tomcat. [We've been using tapestry and tomcat for a year] It was working properly, until I attached the SMTPAppender to a tapestry projekt. An other projekt throws the following exception: org.apache.commons.logging.LogConfigurationException: java.lang.NoClassDefFoundError: javax/mail/internet/AddressException (Caused by java.lang.NoClassDefFoundError: javax/mail/internet/AddressException) But that projekt would not need to send email... I don't understand... I attached the SMTPAppender to projekt cc, and the eTransferManager throws the exception. And in addition: the attached projekt (cc) works , and sends email if I call the logger.error() method despite the fact that I haven't put the mail.jar, and activation jar into it... And the other projekt doesn't start. If I comment out the line I call the SMTP appender, they are working properly. (but no email...) Does anybody has any idea, what's the problem? Thanks fore the help here is the properties file: # root: log4j.rootLogger=ERROR, stdout # packages: log4j.logger.hu.watt22.wde22.cc=DEBUG, logfile log4j.logger.hu.watt22.wde22.cc=ERROR, mail log4j.logger.hu.watt22.wde22.ctransfer=DEBUG, logfile log4j.logger.hu.watt22.nowision.test=DEBUG, logfile # stdout -- Console Appender log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%t] %5p (%F:%L) - %m%n # logfile -- DailyRollingFileAppender log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender log4j.appender.logfile.File=${catalina.home}/myLogs/client.log log4j.appender.logfile.DatePattern='.'-MM-dd # logfile Layout log4j.appender.logfile.layout=org.apache.log4j.PatternLayout log4j.appender.logfile.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p (%F:%L) - %m%n # mail -- SMTPAppender log4j.appender.mail=org.apache.log4j.net.SMTPAppender [EMAIL PROTECTED] [EMAIL PROTECTED] log4j.appender.mail.SMTPHost=mail.watt22hq.hu #log4j.appender.mail.Threshold=ERROR log4j.appender.mail.BufferSize=512 log4j.appender.mail.Subject=WDE Application Error log4j.appender.mail.layout=org.apache.log4j.PatternLayout log4j.appender.mail.layout.ConversionPattern=[%p] %d{DATE} %c - %m%n ...and the whole exception: Aug 10, 2006 4:56:25 PM org.apache.catalina.startup.HostConfig deployWAR SEVERE: Error deploying web application archive eTransferManager.war org.apache.commons.logging.LogConfigurationException: java.lang.NoClassDefFoundError: javax/mail/internet/AddressException (Caused by java.lang.NoClassDefFoundError: javax/mail/internet/AddressException) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:538) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370) at org.apache.catalina.core.ContainerBase.getLogger(ContainerBase.java:380) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4090) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698
Re: problems with SMTPAppender under tomcat
Hello If you don't want that to happen then you can use separate configs per project I thought, this is what theese lines do in properties file: log4j.logger.hu.watt22.wde22.cc=DEBUG, logfile log4j.logger.hu.watt22.wde22.cc=DEBUG, zeroconf log4j.logger.hu.watt22.wde22.ctransfer=DEBUG, logfile log4j.logger.hu.watt22.wde22.ctransfer=ERROR, mail log4j.logger.hu.watt22.nowision.test=DEBUG, logfile (where 'logfile', 'zeroconf' and 'mail' mean different appenders and configs) I used theese settings. Is there any other way to make different configs for different projects? Or this don't do the thing? Thanks: Bence James Stauffer wrote: Yes. When log4j is configured, it configures all of itself so it of course needs to be able to configure every appender. I suppose it could be made to configure appender lazily but it doesn't. It isn't really weird. If you don't want that to happen then you can use separate configs per project. If you want all projects to use the same config then you are grouping them together logically. (Note the spelling of project.) On 8/11/06, Takacs Bence [EMAIL PROTECTED] wrote: Hello The projekt uses the configuration, but has no SMPTAppender attached to it. You mean, that if it use a config in which I call an appender: every package I use should meet the requirements of that appender? This would mean that all my projects would use the mail.api and activation.jar because I attached the SMTPAppender to one of them. This would be weird. Thanks: Bence James Stauffer wrote: If a project that doesn't need to send email uses a log4j config that includes an SMPTAppender log4j still needs to configure that appender so it needs mail.jar and activation.jar. You don't want to have 2 copies of the same jar in the classpath twice. On 8/11/06, Takacs Bence [EMAIL PROTECTED] wrote: Hello I've found a solution on the net: Deleted all tomcat projects includes the mail.jar, and copied the mail.jar and activation.jar to the /tomcat/shared/lib, and everything looks fine. But WHY??? It has solved the problem, but it's not a real solution. The problem remained unrevealed. My questions: - Why does a package , which doesn't need to send a mail throws an AddressException - Why is it problem if I have different projects with mail.jar, and activation.jar? And how can I use them regularly (without exceptions)? Any ideas? Thanks: Bence Takacs Bence wrote: Greetings I've been using log4j for a couple of weeks with tapestry framework, on tomcat. [We've been using tapestry and tomcat for a year] It was working properly, until I attached the SMTPAppender to a tapestry projekt. An other projekt throws the following exception: org.apache.commons.logging.LogConfigurationException: java.lang.NoClassDefFoundError: javax/mail/internet/AddressException (Caused by java.lang.NoClassDefFoundError: javax/mail/internet/AddressException) But that projekt would not need to send email... I don't understand... I attached the SMTPAppender to projekt cc, and the eTransferManager throws the exception. And in addition: the attached projekt (cc) works , and sends email if I call the logger.error() method despite the fact that I haven't put the mail.jar, and activation jar into it... And the other projekt doesn't start. If I comment out the line I call the SMTP appender, they are working properly. (but no email...) Does anybody has any idea, what's the problem? Thanks fore the help here is the properties file: # root: log4j.rootLogger=ERROR, stdout # packages: log4j.logger.hu.watt22.wde22.cc=DEBUG, logfile log4j.logger.hu.watt22.wde22.cc=ERROR, mail log4j.logger.hu.watt22.wde22.ctransfer=DEBUG, logfile log4j.logger.hu.watt22.nowision.test=DEBUG, logfile # stdout -- Console Appender log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%t] %5p (%F:%L) - %m%n # logfile -- DailyRollingFileAppender log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender log4j.appender.logfile.File=${catalina.home}/myLogs/client.log log4j.appender.logfile.DatePattern='.'-MM-dd # logfile Layout log4j.appender.logfile.layout=org.apache.log4j.PatternLayout log4j.appender.logfile.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p (%F:%L) - %m%n # mail -- SMTPAppender log4j.appender.mail=org.apache.log4j.net.SMTPAppender [EMAIL PROTECTED] [EMAIL PROTECTED] log4j.appender.mail.SMTPHost=mail.watt22hq.hu #log4j.appender.mail.Threshold=ERROR log4j.appender.mail.BufferSize=512 log4j.appender.mail.Subject=WDE Application Error log4j.appender.mail.layout=org.apache.log4j.PatternLayout log4j.appender.mail.layout.ConversionPattern=[%p] %d{DATE} %c - %m%n ...and the whole exception: Aug 10, 2006 4:56:25 PM
Chainsaw
Hello Could somebody suggest me a way to try Chainsaw? (appender, appender config, and chainsaw config) I've tried the zeroconf thing on the website, and didn't worked. Could it be the problem, that I runned both my application and Chainsaw in the localhost? Thanks: Bence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problems with SMTPAppender under tomcat
Thanks For me the root level and the selective configuration mean that I don't need to but them separately. But it seems that you are right. If you want all projects to use the same config then you are grouping them together logically. How? Thanks: Bence James Stauffer wrote: I meant different config files. If you move the lib/log4j.jar and classes/log4j.properties from the shared classpath (i.e. tomcat/common) to each webapp (i.e. webapps/app/WEB-INF) then each app will use a separate config file. On 8/11/06, Takacs Bence [EMAIL PROTECTED] wrote: Hello If you don't want that to happen then you can use separate configs per project I thought, this is what theese lines do in properties file: log4j.logger.hu.watt22.wde22.cc=DEBUG, logfile log4j.logger.hu.watt22.wde22.cc=DEBUG, zeroconf log4j.logger.hu.watt22.wde22.ctransfer=DEBUG, logfile log4j.logger.hu.watt22.wde22.ctransfer=ERROR, mail log4j.logger.hu.watt22.nowision.test=DEBUG, logfile (where 'logfile', 'zeroconf' and 'mail' mean different appenders and configs) I used theese settings. Is there any other way to make different configs for different projects? Or this don't do the thing? Thanks: Bence James Stauffer wrote: Yes. When log4j is configured, it configures all of itself so it of course needs to be able to configure every appender. I suppose it could be made to configure appender lazily but it doesn't. It isn't really weird. If you don't want that to happen then you can use separate configs per project. If you want all projects to use the same config then you are grouping them together logically. (Note the spelling of project.) On 8/11/06, Takacs Bence [EMAIL PROTECTED] wrote: Hello The projekt uses the configuration, but has no SMPTAppender attached to it. You mean, that if it use a config in which I call an appender: every package I use should meet the requirements of that appender? This would mean that all my projects would use the mail.api and activation.jar because I attached the SMTPAppender to one of them. This would be weird. Thanks: Bence James Stauffer wrote: If a project that doesn't need to send email uses a log4j config that includes an SMPTAppender log4j still needs to configure that appender so it needs mail.jar and activation.jar. You don't want to have 2 copies of the same jar in the classpath twice. On 8/11/06, Takacs Bence [EMAIL PROTECTED] wrote: Hello I've found a solution on the net: Deleted all tomcat projects includes the mail.jar, and copied the mail.jar and activation.jar to the /tomcat/shared/lib, and everything looks fine. But WHY??? It has solved the problem, but it's not a real solution. The problem remained unrevealed. My questions: - Why does a package , which doesn't need to send a mail throws an AddressException - Why is it problem if I have different projects with mail.jar, and activation.jar? And how can I use them regularly (without exceptions)? Any ideas? Thanks: Bence Takacs Bence wrote: Greetings I've been using log4j for a couple of weeks with tapestry framework, on tomcat. [We've been using tapestry and tomcat for a year] It was working properly, until I attached the SMTPAppender to a tapestry projekt. An other projekt throws the following exception: org.apache.commons.logging.LogConfigurationException: java.lang.NoClassDefFoundError: javax/mail/internet/AddressException (Caused by java.lang.NoClassDefFoundError: javax/mail/internet/AddressException) But that projekt would not need to send email... I don't understand... I attached the SMTPAppender to projekt cc, and the eTransferManager throws the exception. And in addition: the attached projekt (cc) works , and sends email if I call the logger.error() method despite the fact that I haven't put the mail.jar, and activation jar into it... And the other projekt doesn't start. If I comment out the line I call the SMTP appender, they are working properly. (but no email...) Does anybody has any idea, what's the problem? Thanks fore the help here is the properties file: # root: log4j.rootLogger=ERROR, stdout # packages: log4j.logger.hu.watt22.wde22.cc=DEBUG, logfile log4j.logger.hu.watt22.wde22.cc=ERROR, mail log4j.logger.hu.watt22.wde22.ctransfer=DEBUG, logfile log4j.logger.hu.watt22.nowision.test=DEBUG, logfile # stdout -- Console Appender log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%t] %5p (%F:%L) - %m%n # logfile -- DailyRollingFileAppender log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender log4j.appender.logfile.File=${catalina.home}/myLogs/client.log log4j.appender.logfile.DatePattern='.'-MM-dd
Re: Chainsaw
Thanks, It works. And do somebody know anything about that zeroconf thing mentioned on Chainsaw's webpage? Does somebody configured successfully the zeroconf appender? If yes, how? Thanks: Bence Scott Deboy wrote: In Chainsaw, when you launch it and it asks you for a configuration, select the 'SocketReceiver/port 4445' option. On the app side, use a SocketAppender pointing to localhost, port 4445. Chainsaw should start to receive your events automatically. You probably need to make sure locationInfo is not 'true' in the socketappender. Scott -Original Message- From: Takacs Bence [mailto:[EMAIL PROTECTED] Sent: Friday, August 11, 2006 8:53 AM To: Log4J Users List Subject: Chainsaw Hello Could somebody suggest me a way to try Chainsaw? (appender, appender config, and chainsaw config) I've tried the zeroconf thing on the website, and didn't worked. Could it be the problem, that I runned both my application and Chainsaw in the localhost? 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: problems with SMTPAppender under tomcat
OK, but technically how? from config file? can the config file make a reference to an other config file? what is the syntax of this command? Thanks: Bence James Stauffer wrote: On 8/11/06, Takacs Bence [EMAIL PROTECTED] wrote: If you want all projects to use the same config then you are grouping them together logically. How? You are telling them all to use the same config so you are having them all use the same log4j instance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Different Log4j log file(s) based on Logging Level?
According to the documentation you need to make your own MyLevel class and extends the original Level. But I haven't done it yet, and don't know if it's enough or not and how much additional work you need. Madduri, Murthy wrote: logger name=com.logging.test !-- Logging level (i.e. WARN) for this logger: -- level value=CONFIG / !-- File appender for this logger: -- appender-ref ref=fileAppender / /logger The appender mentioned in the above example is an appender that writes to a separate log file (ex, myapp-config.log) file. But, my question is how can I define a custom Level CONFIG and make it lower than DEBUG? How can I do this in the solution mentioned below: First,create a level CONFIG. make config lower priority than DEBUG, add filters to accept only config messages in that appender -Original Message- From: Javier Gonzalez [mailto:[EMAIL PROTECTED] Sent: Friday, August 11, 2006 12:33 PM To: Log4J Users List Subject: Re: Different Log4j log file(s) based on Logging Level? On 8/11/06, Madduri, Murthy [EMAIL PROTECTED] wrote: We have hierarchical logging in our applications. But, this requirement is to have the logs grouped based on a custom level. For a typical configuration transaction, the logger can record messages from various hierarchies. We are not guaranteed of the sequence of messages in this whole transaction. We are pretty much getting all the messages, but, they ended up mixing with other trace statements. For example, if we have a new custom log level, can we use that in logger configuration like this? logger name=com.logging.test !-- Logging level (i.e. WARN) for this logger: -- level value=CONFIG / !-- File appender for this logger: -- appender-ref ref=fileAppender / /logger You could, but that (I think) would mean you get all the messages of level config and above, unless you make config higher than fatal. What you could do is have an appender that is dedicated to these config messages, make config lower priority than DEBUG, add filters to accept only config messages in that appender, and then set the threshold of the other loggers above config. (root logger set at config level) That way, the normal appenders don't log config, and the config appender logs only config. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]