Re: cannot write to a file with rollingfileappender in log4j1.3
Hi, I hope DOM Configurator doesnot support rollingfileappender(updated in1.3), because elements like rollingpolicy are not identified by DOM Configurator.I have checked in log4j.dtd wich allows only some specific elements like (errorHandler?,param*,layout?,filter*,appender-ref*)".I have got the following warnings: log4j:WARN Continuable parsing error 8 and column 76 log4j:WARN Element type "rollingPolicy" must be declared. log4j:WARN Continuable parsing error 15 and column 14 log4j:WARN The content of element type "appender" must match "(errorHandler?,param*,layout?,filter*,appender-ref*)" My configuration file lokslike http://jakarta.apache.org/log4j/"; debug="false"> I dont want to refer to the log4j.xml statically, because i have many instances of tomcat and for each and every instance i will generate log file in seperate location.The location of logfile should be changed in a property file rather than system property. so can any one let me know the solution to write to fileusing rollingfileappender in log4j1.3. Thanks in advance. Regards Rohan Jacob Kjome <[EMAIL PROTECTED]> wrote: Quoting dirk ooms : > On Monday 15 January 2007 19:04, Jacob Kjome wrote: > > The file should look something like this... > > > > > > > > debug="false" threshold="debug"> > > AFAIK the tag was used in version 1.2.x, but it is > inproper xml. In 1.3 this was corrected (or at least an attempt was made) to > . So it might be that the deprecated DOMConfigurator is still > expecting ..., but if one relies on the default > initialization, the tag is expected in version 1.3. > Exactly. The deprecated DOMConfigurator still uses the old syntax. I don't recall whether the JoranConfigurator can deal with the old syntax or not? It's been a while since I tested that (I think maybe it doesn't). In any case, it should, just to be backward compatible. Or, at least, JoranConfigurator should recognize the old syntax and defer to DOMConfigurator in that case. Of course there's other compatibility gotcha's between 1.2 and 1.3. Jake > dirk > > > > > > > > > > > > > > > > > > > Jake > > > > Quoting Surya Poola : > > > Hi, > > > Iam getting the following warnings if iam using DOM Configurator and > > > iam not getting the log file created: > > > > > > log4j:WARN Continuable parsing error 2 and column 16 > > > log4j:WARN Document root element "configuration", must match DOCTYPE root > > > "null". > > > log4j:WARN Continuable parsing error 2 and column 16 > > > log4j:WARN Document is invalid: no grammar found. > > > log4j:WARN The element has been deprecated. > > > log4j:WARN Use the element instead. > > > > > > I hope DOM configurator doesnot support the xml generated for log4j1.3 > > > from (http://wizardforge.org/pc?action=show), like > > > > > > > > > > > > > > > name="MyFileAppender"> > > > > > > > > > > > > > value="/pkg/vdcu0/home/bischru0/AladinArchiveViewer.d/AladinArchiveViewer.% > >d{-MM}.gz"/> > > > > > > > > > > > > > > %m%n" /> > > > > > > > > > > > > > > > > > > > > > > > > > > > I have tried changing the xml as per log4j1.2.x version ,but then also > > > i am getting the same error.so can anyone suggest me the proper usage of > > > rollingfielappender in log4j1.3 version. > > > > > > Thanks in advance > > > > > > Regards > > > Rohan > > > > > > James Stauffer wrote: > > > Even though DOMConfigurator is depreciated it may still work and it > > > may be worthwhile to try it to see if your config is ok. > > > > > > On 1/15/07, Surya Poola wrote: > > > > Dirk, > > > > > > > > Thanks for your help,but iam sorry to query you once more: > > > > > > > > I already have gone through the document.My question is in log4j 1.2.8 > > > > i > > > > > > was using the following for DailyRollingFileAppender to map to > > > configuration > > > > > > file : > > > > DOMConfigurator.configure(mLOG4JCONFIGFILE); > > > > where mLOG4JCONFIGFILE was the property where i mentioned the location > > > > of > > > > > > xml file. > > > > > > > But in 1.3 alpha-8,DOMConfigurator is depracated. > > > > > > > > So iam forced to use joranconfigurator, by which iam not able to write > > > > to > > > > > > file,ie, file is not created.I am mentioning my program as follows: > > > > JoranConfigurator jc = new JoranConfigurator(); > > > > jc.doConfigure(mLOG4JCONFIGFILE, LogManager.getLoggerRepository()); > > > > > > > > So can you let me kow how to configure with joranconfigurator or any > > > > other > > > > > > configurator. > > > > > > > Thanks in advance > > > > > > > > Regards > > > > Rohan > > > > > > > > Dirk Ooms wrote: > > > > Rohan, > > > > > > > > have a look at the 'Default Initalization Procedure' at > > > > > > http://logging.apache.org/log4j/docs/manual.html > > > > > > > it explains how log4j will find your config file. > > > > > > > > dirk > > > > > > > > ---
Re: cannot write to a file with rollingfileappender in log4j1.3
Rohan, do you have multiple instances of tomcat or multiple webapps within tomcat? anyway, typically one puts the log4j.xml in the WEB-INF/classes of each webapp. it will then be picked up by JoranConfigurator (without doing anything explicit in your code, except for a getLogger()). Do not use the in version 1.3, JoranConfigurator does not accept it. dirk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot write to a file with rollingfileappender in log4j1.3
On Jan 16, 2007, at 7:32 AM, Surya Poola wrote: Hi, I hope DOM Configurator doesnot support rollingfileappender (updated in1.3), because elements like rollingpolicy are not identified by DOM Configurator.I have checked in log4j.dtd wich allows only some specific elements like (errorHandler?,param*,layout?,filter*,appender-ref*)".I have got the following warnings: log4j:WARN Continuable parsing error 8 and column 76 log4j:WARN Element type "rollingPolicy" must be declared. log4j:WARN Continuable parsing error 15 and column 14 log4j:WARN The content of element type "appender" must match "(errorHandler?,param*,layout?,filter*,appender-ref*)" The log4j.dtd used during by the XML parser for validation was not updated when the org.apache.log4j.rolling.RollingFileAppender and related classes were added. This results in the XML parser emitting those warnings which the DOM/JoranConfigurator logs but otherwise ignores. Getting those warnings does not indicate that the configuration file is necessarily bad or not correctly processed. The issue was recently discussed (2006-12-05) on the log4cxx-user mailing list, but it does not seem bug reports were filed at that time. I've just filed http://issues.apache.org/bugzilla/show_bug.cgi? id=41378 and https://issues.apache.org/jira/browse/LOGCXX-168 for log4j and log4cxx respectively. On Jan 16, 2007, at 8:48 AM, Dirk Ooms wrote: Rohan, do you have multiple instances of tomcat or multiple webapps within tomcat? anyway, typically one puts the log4j.xml in the WEB-INF/ classes of each webapp. it will then be picked up by JoranConfigurator (without doing anything explicit in your code, except for a getLogger()). Do not use the in version 1.3, JoranConfigurator does not accept it. I'm pretty sure that you are mistaken on the lack of support for log4j:configuration. The input files used by the unit tests all have log4j:configuration elements, for example, http://svn.apache.org/ repos/asf/logging/log4j/trunk/tests/input/rolling/time1.xml. Below follows more information that you probably want to know, skip it if you get confused. The XML syntax supported and documented log4j 1.2 is unusual: the configuration element is namespace-qualified (http:// jakarta.apache.org/log4j) and the child elements are not in any namespace. If you switch from: http://jakarta.apache.org/log4j";> to http://jakarta.apache.org/log4j";> The document is now different from an XML perspective since the appender element changes from being non-namespace qualified (represented by a null namespace) to being in the same namespace as the configuration element. The current XML document design also does not support effective validation. A validation parser or XML aware editor can't validate that parameter values are the right types or that the required parameters are present. A project to create a XML configuration format that could be effectively validated was started in the sandbox (http://svn.apache.org/repos/asf/logging/sandbox/strictxml). However that project has only limited functionality at this time and has had no recent activity. Likely dormant until log4j 2.0 is started in earnest. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot write to a file with rollingfileappender in log4j1.3
Dirk, I have multiple instance of webapp applications .So currently i tried by saving my log4j.xml file in WEB-INF/classes folder. The file is been picked up, but i am getting the same warnings that i got earlier without any file output( Ihave switched on the debug . mode) log4j:WARN Continuable parsing error 3 and column 29 log4j:WARN Document root element "configuration", must match DOCTYPE root "null". log4j:WARN Continuable parsing error 3 and column 29 log4j:WARN Document is invalid: no grammar found. log4j:WARN The element has been deprecated. log4j:WARN Use the element instead. log4j: Threshold ="". log4j: Level value for root is [info]. log4j: root level set to INFO log4j: Class name: [org.apache.log4j.rolling.RollingFileAppender] log4j: Setting property [append] to [true]. log4j: Parsing layout of class: "org.apache.log4j.PatternLayout" log4j: Setting property [conversionPattern] to [%d{-MM-dd HH:mm:ss},%p,%c,%t %m%n]. My log4j.xml file looks like: and i just given the following stements in my code: logger=Logger.getLogger (Classname.class); logger.info("Perormance log Classname"); is the default configurator DOM or Joran .as per the output it looks like DOM. Can you help me in fixing this issue. Thanks in advance. Regards Rohan Dirk Ooms <[EMAIL PROTECTED]> wrote: Rohan, do you have multiple instances of tomcat or multiple webapps within tomcat? anyway, typically one puts the log4j.xml in the WEB-INF/classes of each webapp. it will then be picked up by JoranConfigurator (without doing anything explicit in your code, except for a getLogger()). Do not use the in version 1.3, JoranConfigurator does not accept it. dirk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. - Any questions? Get answers on any topic at Yahoo! Answers. Try it now.
Use category to limit by package name possible?
I have read all the documentation I could find on using an XML config file for Log4J (slim pickings) but can not figure out how to log INFO messages to a file that come from a specific package. Any help would be appreciated. I have a file appender that I want to limit to: 1. info 2. by package name My appender looks like this: The limiting categories looks like this: The idea is to have all INFO messages from org.apache.myfaces & javax.faces go to a jsf.info.log file. --- Here is the exception that I get what I get when I launch my servlet/jsp/jsf container (running under tomcat) log4j: Desired logger sub-class: [javax.faces] log4j:ERROR Could not retrieve category [org.apache.log4j.xml]. Reported error follows. java.lang.ClassNotFoundException: javax.faces at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) --- I have the javax.faces (jar) packaged in my web application (war), which is then deployed to Tomcat (which is now configured to use log4j) --- Also is is possilbe to specify that the log file should go under $CATALINA_HOME/logs? How do I specify in the XML file where the log file should go? Thanks Lisa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use category to limit by package name possible?
1. -> 2. Remove class attribute from category/logger. 3. Define a node at the bottom. On 1/16/07, Lisa <[EMAIL PROTECTED]> wrote: I have read all the documentation I could find on using an XML config file for Log4J (slim pickings) but can not figure out how to log INFO messages to a file that come from a specific package. Any help would be appreciated. I have a file appender that I want to limit to: 1. info 2. by package name My appender looks like this: The limiting categories looks like this: The idea is to have all INFO messages from org.apache.myfaces & javax.faces go to a jsf.info.log file. --- Here is the exception that I get what I get when I launch my servlet/jsp/jsf container (running under tomcat) log4j: Desired logger sub-class: [javax.faces] log4j:ERROR Could not retrieve category [org.apache.log4j.xml]. Reported error follows. java.lang.ClassNotFoundException: javax.faces at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) --- I have the javax.faces (jar) packaged in my web application (war), which is then deployed to Tomcat (which is now configured to use log4j) --- Also is is possilbe to specify that the log file should go under $CATALINA_HOME/logs? How do I specify in the XML file where the log file should go? Thanks Lisa - 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: Logging stops after hours working
More to add to this case: - We are not using any special classloader, and there is no other log4j.properties hanging around that the IDE or grep could find. - We didn't extend the log4j code by writing Appenders or other classes. - We are only using the basic Logger methods (.error() .warn(), .isDebugEnabled(), etc) - This is a multithreaded application running a home-made web-server. Clarification on the lines logged: ... Some unrelated logging here that is not log4j-related here... the last log4j-related loged info is hours before. log4j: Hierarchy threshold set to [OFF]. log4j: Could not find root logger information. Is this OK? log4j: Finished configuring. ... no more logging here Thanks, Cristian Jansenson -Original Message- From: Cristian Jansenson [mailto:[EMAIL PROTECTED] Sent: Monday, January 15, 2007 10:12 AM To: log4j-user@logging.apache.org Subject: Logging stops after hours working I am running an application that uses log4j version 1.2.9. The application is running on Java 1.5.0.9 for Linux 64-bit version. After minutes or hours of running and logging, log4j stops logging. The console shows the following message, which partially explains the reason: log4j: Hierarchy threshold set to [OFF]. log4j: Could not find root logger information. Is this OK? log4j: Finished configuring. But why does this happen? Since this information is printed from the PropertyConfigurator, It looks as if log4j were re-configuring, even though I am NOT using the configureAndWatch method, and the log4j.properties file was neither touched nor changed. My log4j.properties: # enable log4j debugging, and set threshold=ALL (see bug 10598) log4j.threshold=ALL log4j.debug=true # Set root logger level to DEBUG and its only appender to A1. log4j.rootLogger=ERROR, A1 log4j.logger.http=WARN, HTTP # see bug 10603: http should not inherit appenders, etc, from root. log4j.additivity.http=false log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender log4j.appender.A1.File=logs/error-${port}.log log4j.appender.A1.DatePattern='.'-MM-dd # A1 uses PatternLayout. log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d{DATE} %x [%t] %-5p %c %x - %m%n # HTTP Log config log4j.appender.HTTP=org.apache.log4j.DailyRollingFileAppender log4j.appender.HTTP.File=logs/http-${port}.log log4j.appender.HTTP.DatePattern='.'-MM-dd # A1 uses PatternLayout. log4j.appender.HTTP.layout=org.apache.log4j.PatternLayout log4j.appender.HTTP.layout.ConversionPattern=%m%n I hope you can help me on this issue, Cristian Jansenson -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.410 / Virus Database: 268.16.10/626 - Release Date: 1/14/2007 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.410 / Virus Database: 268.16.10/626 - Release Date: 1/14/2007 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.410 / Virus Database: 268.16.12/631 - Release Date: 1/16/2007 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use category to limit by package name possible?
James Stauffer gmail.com> writes: > > 1. -> > 2. Remove class attribute from category/logger. > 3. Define a node at the bottom. Thanks! but I still have a few problems. #3 node was not required. The appender stayed the same. the category (changed to logger) now looks like this: (note priority is no longer an acceptable tag - changed to level) But now I want a debug log file with debug messages and above and an info file with info and above on the same package. It appears to me that the name="" is the limiting param but also functions as an id for the tag so log4j is complaining. How do I create two loggers that limit to com.presence (one logger for debug and one for info)? Log4J startup gives the following error message: log4j:WARN Attribute value "com.presence" of type ID must be unique within the document. So how do you have two loggers that limit to the same package but different levels (debug,info)? Thanks Lisa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use category to limit by package name possible?
My advice: Don't split your logs into a Debug and Info log files. Not that log4j can't do that (see more below) but seriously consider that both the debug and info logs are even more useful when you have the context of them together. So my advice is to have one file appender, attached to all loggers you wish to capture logs from, and set your loggers to DEBUG. this will give you both Debug and Info (and other levels) in the one file making understanding what is going on much simpler, since you can see them in sequence. However... if you must... and you really want to.. Then create 2 file appenders, and set the _Appenders_ to have a Filter that only accepts the Level you are interested in (you might need to write a simple filter class for this), Debug or Info (for which ever file you wanted), then set your loggers to the lowest threshold you want to capture (debug) and attach BOTH appenders to all the loggers. This way a logger emits a DEBUG log event, which goes to both appenders, but each appender decides whether to append it to the file, because of the Filter. cheers, Paul On 17/01/2007, at 1:13 PM, Lisa wrote: James Stauffer gmail.com> writes: 1. -> 2. Remove class attribute from category/logger. 3. Define a node at the bottom. Thanks! but I still have a few problems. #3 node was not required. The appender stayed the same. the category (changed to logger) now looks like this: (note priority is no longer an acceptable tag - changed to level) But now I want a debug log file with debug messages and above and an info file with info and above on the same package. It appears to me that the name="" is the limiting param but also functions as an id for the tag so log4j is complaining. How do I create two loggers that limit to com.presence (one logger for debug and one for info)? Log4J startup gives the following error message: log4j:WARN Attribute value "com.presence" of type ID must be unique within the document. So how do you have two loggers that limit to the same package but different levels (debug,info)? Thanks Lisa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Paul Smith Engineering Manager Aconex The easy way to save time and money on your project 696 Bourke Street, Melbourne, VIC 3000, Australia Tel: +61 3 9240 0200 Fax: +61 3 9240 0299 Email: [EMAIL PROTECTED] www.aconex.com This email and any attachments are intended solely for the addressee. The contents may be privileged, confidential and/or subject to copyright or other applicable law. No confidentiality or privilege is lost by an erroneous transmission. If you have received this e-mail in error, please let us know by reply e-mail and delete or destroy this mail and all copies. If you are not the intended recipient of this message you must not disseminate, copy or take any action in reliance on it. The sender takes no responsibility for the effect of this message upon the recipient's computer system. smime.p7s Description: S/MIME cryptographic signature
RE: Logging stops after hours working
The behavior is curious. I would guess that some other library is configuring Log4j on it's own. This doesn't have to be via a config file. It could be just doing it programmatically. I take it you searched for both log4j.properties *and* log4j.xml. You only mentioned the former, so I thought I'd make sure. This one's a tough nut to crack. I'm not sure I can say anything other than good luck finding the source of the problem! BTW, the printing you see is being printed by LogLog, which is Log4j bootstrap logger. Log4j 1.3 uses standard Log4j logging to log its own messages. Log4j 1.2.xx uses LogLog to log its own messages. Jake At 07:59 PM 1/16/2007, you wrote: >More to add to this case: > >- We are not using any special classloader, and there is no other >log4j.properties hanging around that the IDE or grep could find. >- We didn't extend the log4j code by writing Appenders or other classes. >- We are only using the basic Logger methods (.error() .warn(), >.isDebugEnabled(), etc) >- This is a multithreaded application running a home-made web-server. > >Clarification on the lines logged: > >... Some unrelated logging here that is not log4j-related here... the last >log4j-related loged info is hours before. >log4j: Hierarchy threshold set to [OFF]. >log4j: Could not find root logger information. Is this OK? >log4j: Finished configuring. >... no more logging here > >Thanks, > >Cristian Jansenson > >-Original Message- >From: Cristian Jansenson [mailto:[EMAIL PROTECTED] >Sent: Monday, January 15, 2007 10:12 AM >To: log4j-user@logging.apache.org >Subject: Logging stops after hours working > >I am running an application that uses log4j version 1.2.9. The application >is running on Java 1.5.0.9 for Linux 64-bit version. After minutes or hours >of running and logging, log4j stops logging. The console shows the >following message, which partially explains the reason: > > > >log4j: Hierarchy threshold set to [OFF]. > >log4j: Could not find root logger information. Is this OK? > >log4j: Finished configuring. > > > >But why does this happen? Since this information is printed from the >PropertyConfigurator, It looks as if log4j were re-configuring, even though >I am NOT using the configureAndWatch method, and the log4j.properties file >was neither touched nor changed. > > > >My log4j.properties: > > > ># enable log4j debugging, and set threshold=ALL (see bug 10598) > >log4j.threshold=ALL > >log4j.debug=true > > > ># Set root logger level to DEBUG and its only appender to A1. > >log4j.rootLogger=ERROR, A1 > >log4j.logger.http=WARN, HTTP > > > ># see bug 10603: http should not inherit appenders, etc, from root. > >log4j.additivity.http=false > > > >log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender > >log4j.appender.A1.File=logs/error-${port}.log > >log4j.appender.A1.DatePattern='.'-MM-dd > > > ># A1 uses PatternLayout. > >log4j.appender.A1.layout=org.apache.log4j.PatternLayout > >log4j.appender.A1.layout.ConversionPattern=%d{DATE} %x [%t] %-5p %c %x - >%m%n > > > > > ># HTTP Log config > > > > > >log4j.appender.HTTP=org.apache.log4j.DailyRollingFileAppender > >log4j.appender.HTTP.File=logs/http-${port}.log > >log4j.appender.HTTP.DatePattern='.'-MM-dd > > > ># A1 uses PatternLayout. > >log4j.appender.HTTP.layout=org.apache.log4j.PatternLayout > > > >log4j.appender.HTTP.layout.ConversionPattern=%m%n > > > > > >I hope you can help me on this issue, > > > >Cristian Jansenson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use category to limit by package name possible?
On Jan 16, 2007, at 8:13 PM, Lisa wrote: Log4J startup gives the following error message: log4j:WARN Attribute value "com.presence" of type ID must be unique within the document. So how do you have two loggers that limit to the same package but different levels (debug,info)? I agree with the other comments, but I thought it might be helpful to explain the causes for the warnings/exceptions that you are running into. In this case, you have conflicting configurations for the same logger. Loggers are identified by their names. There can only be one logger named "org.apache.myfaces" in a logging hierarchy (and there is usually only one of those per app). Calling Logger.getLogger ("org.apache.myfaces") will always return the same logger. Logger names are not inherently tied to class names, but it is a very common pattern for developers to use logger names that mimic class names. However, you are free to design any logger naming convention that fits your needs. The only magic thing about names is that a period (".") is used to separate fragments of the name. The idea is to have all INFO messages from org.apache.myfaces & javax.faces go to a jsf.info.log file. --- Here is the exception that I get what I get when I launch my servlet/jsp/jsf container (running under tomcat) log4j: Desired logger sub-class: [javax.faces] log4j:ERROR Could not retrieve category [org.apache.log4j.xml]. Reported error follows. java.lang.ClassNotFoundException: javax.faces at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) The exception occurs since you specified that you wanted to use the classes "javax.faces" and "org.apache.myfaces" as implementations of the org.apache.log4j.Category contract. As previously noted, the term "logger" has replaced "category" long time ago (but "category" is still there for compatibility). Since you did not implement classes named "javax.faces" or "org.apache.myfaces" that extended "org.apache.log4j.Category", you were bound to get an exception. You appear like you may be hoping that log4j can magically add logging code to an implementation classes in "org.apache.myfaces" or "javax.faces" packages. Log4j and other common logging frameworks require explicitly coding logging requests within a body of code and the authors of the code choose their own naming convention. The type of behavior that you may be looking for would require an aspect oriented language like AspectJ. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use category to limit by package name possible?
Curt Arnold apache.org> writes: > The exception occurs since you specified that you wanted to use the > classes "javax.faces" and "org.apache.myfaces" as implementations of > the org.apache.log4j.Category contract. As previously noted, the > term "logger" has replaced "category" long time ago (but "category" > is still there for compatibility). Since you did not implement > classes named "javax.faces" or "org.apache.myfaces" that extended > "org.apache.log4j.Category", you were bound to get an exception. > > You appear like you may be hoping that log4j can magically add > logging code to an implementation classes in "org.apache.myfaces" or > "javax.faces" packages. Log4j and other common logging frameworks > require explicitly coding logging requests within a body of code and > the authors of the code choose their own naming convention. The type > of behavior that you may be looking for would require an aspect > oriented language like AspectJ. > I was under the impression that name="org.apache.myfaces" property of for example would be the way the logger knew to only log debug/info from everything containing that package name. If I name it anything I want, like name="idMyfaces" how does the logger limit output confined to "org.apache.myfaces.*" ? Is there something I am missing? Lisa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]