You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2003/05/18 16:17:02 UTC
Bug report for Log4j [2003/05/18]
+---------------------------------------------------------------------------+
| Bugzilla Bug ID |
| +---------------------------------------------------------------------+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned |
| | OPN=Reopened VER=Verified (Skipped Closed/Resolved) |
| | +-----------------------------------------------------------------+
| | | Severity: BLK=Blocker CRI=Critical MAJ=Major |
| | | MIN=Minor NOR=Normal ENH=Enhancement |
| | | +-------------------------------------------------------------+
| | | | Date Posted |
| | | | +--------------------------------------------------+
| | | | | Description |
| | | | | |
| 569|Ver|Cri|2001-02-09|fully qualified class name used as category name c|
| 851|Ass|Min|2001-03-05|DOM Configurator not throwing exception when targe|
| 900|New|Cri|2001-03-08|RollingFileAppender does not work properly under W|
| 4561|Ass|Nor|2001-11-01|Log4J threads don't seem to terminate incase of th|
| 4861|Ass|Min|2001-11-14|log4j:ERROR Failed to flush writer |
| 5211|Ass|Nor|2001-11-30|DailyRollingFileAppender should check renameTo res|
| 7678|Opn|Nor|2002-04-02|if log file is deleted, data will be lost until de|
| 8529|New|Maj|2002-04-25|JDBCAppender doesn't take throwable stack trace |
| 9150|New|Maj|2002-05-16|No check in FileAppender if parent-path exists |
|10560|New|Nor|2002-07-08|DailyRollingAppender does not roll each period |
|10587|New|Enh|2002-07-09|Illogical difference between removeAppender and re|
|10706|New|Enh|2002-07-11|MDC layout format %X{...} enhancement |
|11009|New|Min|2002-07-20|Cannot access XMLSample page |
|11142|New|Min|2002-07-24|org.apache.log4j.net.SocketServer doesn't work wit|
|11186|New|Min|2002-07-25|DefaultRenderer.doRender() does not handle NullPoi|
|11285|New|Nor|2002-07-30|SocketAppender fails to reconnect immediately |
|11446|New|Nor|2002-08-03|Rolling, DailyRolling & FileAppender do not append|
|11474|New|Enh|2002-08-05|Improvements to rolling file appenders |
|11512|New|Nor|2002-08-06|Chainsaw forces output of its internal messages to|
|11907|New|Enh|2002-08-21|DailyRollingFileAppender should extend RollingFile|
|12112|New|Maj|2002-08-28|CountingQuietWriter wrongly uses # of characters i|
|13021|New|Min|2002-09-26|DailyRollingFileAppender - change renameTo |
|13099|New|Nor|2002-09-27|DOMConfigurator ignores category factory setting |
|13171|New|Enh|2002-10-01|Some little spelling mistakes and deprecation warn|
|13540|New|Nor|2002-10-11|log factor 5 max record memory overflow possible |
|13659|New|Nor|2002-10-15|NTEventLogAppender event categories and usernames |
|13702|New|Enh|2002-10-16|More options when naming log files using DailyRoll|
|13900|New|Nor|2002-10-23|SMTPAppender doesn't use fallback append. for emai|
|13947|New|Enh|2002-10-24|DailyRollingFileAppender.rollover() uses default a|
|14198|New|Nor|2002-11-03|jni error when running againt Sun JRE 1.4.0_02 wi|
|14350|New|Nor|2002-11-07|Patch to substitute variables in the log4j.configu|
|14435|New|Enh|2002-11-11|Right-truncate priority to 1 character |
|14551|New|Nor|2002-11-14|missing or displaced dtd for XMLayout class |
|14934|New|Nor|2002-11-28|MDC has no setContext() method |
|14935|New|Nor|2002-11-28|Logger.getLogger() |
|15056|New|Maj|2002-12-04|DailyRollingFileAppender doesn't roll over weeks, |
|15177|New|Nor|2002-12-09|configureAndWatch fails with ExternallyRolledFileA|
|15198|New|Nor|2002-12-09|TelnetAppender: NullPointerException if SocketHand|
|15501|New|Nor|2002-12-18|FallbackErrorHandler throws NPW if no loggers are |
|15585|Ass|Maj|2002-12-20|log4j does not show Class Name, Method, or Line Nu|
|15867|New|Nor|2003-01-07|compile error in VisalAge For Java after import |
|15885|New|Maj|2003-01-08|EXCEPTION_ACCESS_VIOLATION with a particular Conve|
|15896|New|Nor|2003-01-08|PropertyConfigurator.configureAndWatch thread not |
|15899|New|Enh|2003-01-08|SocketServer won't use IP address if server has no|
|15939|New|Nor|2003-01-10|SMTPAppender doesn't print stack trace correctly |
|15942|New|Nor|2003-01-10|Can't specify encoding to ConsoleAppender |
|15960|New|Nor|2003-01-10|TelnetAppender prevents tomcat from shutting down |
|16022|New|Enh|2003-01-13|ObjectRenderers should also apply to l7dlog |
|16105|New|Nor|2003-01-15|AsyncAppender with null message |
|16229|New|Enh|2003-01-17|Convenience methods to cut object allocations in a|
|16238|New|Cri|2003-01-19|log4j(1.2.6) - does not terminate if permission is|
|16280|New|Min|2003-01-21|Error Message always logged to log4j when calling |
|16360|New|Nor|2003-01-23|Lack of properties on LoggingEvent |
|16462|New|Enh|2003-01-27|Add a method to check if repository is configured |
|16468|New|Maj|2003-01-27|Thread overrun causes message buffer to clear with|
|16663|New|Nor|2003-02-01|DailyRollingFileAppender with more than one 'xxx' |
|16883|New|Nor|2003-02-07|ConsoleAppender default Contructor does not define|
|16887|New|Enh|2003-02-07|Please create a file appender that restarts the lo|
|16922|New|Nor|2003-02-10|MDC with SMTPAppender doesn't work |
|17084|New|Nor|2003-02-14|log factor 5 displays incorrect level |
|17201|New|Nor|2003-02-19|DailyRollingFileAppender and multi-instance |
|17227|New|Nor|2003-02-20|Links for sample XMLs are inaccurate |
|17258|New|Maj|2003-02-20|ClassCastException on logger.error(String) |
|17331|New|Nor|2003-02-24|SocketAppender throws a full stacktrace during ini|
|17341|New|Enh|2003-02-24|Chainsaw color coding |
|17377|New|Nor|2003-02-25|PatternConverter.format() does not truncate string|
|17498|New|Nor|2003-02-27|Logging inconsistencies using DailyRollingFileAppe|
|17507|Ass|Min|2003-02-27|Priority does not override hashCode() method |
|17511|Opn|Enh|2003-02-28|Patch for Chainsaw to utilise Receiver framework |
|17531|New|Min|2003-02-28|PropertyConfigurator.configureAndWatch() don't res|
|17652|New|Enh|2003-03-05|Support for Mainframe (Z/OS environments) |
|17862|New|Enh|2003-03-11|Version.getVersion() method requested |
|17940|New|Maj|2003-03-13|SockerServer relies upon InetAddress.toString() fo|
|18076|New|Min|2003-03-17|slight improvement in OnlyOnceErrorHandler |
|18122|New|Nor|2003-03-18|The DOMConfiguration javadoc link to log4j.dtd is |
|18163|New|Nor|2003-03-19|bug in the flushBuffer method of JDBCAppender |
|18246|New|Enh|2003-03-22|Patch: Add more MDC support to XMLLayout and Patte|
|18393|New|Nor|2003-03-27|Documentation for DailyRollingFileAppender mislead|
|18875|New|Nor|2003-04-09|Priority.DEBUG == Level.DEBUG is false |
|18890|New|Enh|2003-04-10|Patch: Additions for LoggingEvents Property set |
|18965|New|Cri|2003-04-11|DailyRollingFileAppender leaves file locked causin|
|19109|New|Nor|2003-04-17|need to wrap log4j |
|19125|New|Enh|2003-04-17|SMTP Appender should support more of the JavaMail |
|19127|New|Nor|2003-04-17|Superflous FAQ entries |
|19258|New|Enh|2003-04-23|Methiod returning the log4j version number |
|19498|New|Enh|2003-04-30|log message grepping source analyzer - greps out l|
|19597|New|Enh|2003-05-02|Enhancement: KeyFileAppender |
|19796|New|Enh|2003-05-09|Would be nice to have RelativeTimeDateFormat avail|
|19861|New|Nor|2003-05-12|Allow override of calls to System.getProperty() in|
|19902|New|Nor|2003-05-13|PropertyConfigurator throws ExceptionInInitializer|
|19920|New|Enh|2003-05-14|Colored console output |
+-----+---+---+----------+--------------------------------------------------+
| Total 91 bugs |
+---------------------------------------------------------------------------+
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
Re: Configurator questions
Posted by Ceki Gülcü <ce...@qos.ch>.
At 11:01 AM 5/18/2003 -0400, you wrote:
>Hello,
>
>I am working on a JNDI-based ConnectionSource for the
>PreparedStatementAppender I have been working on and I have a couple of
>questions concerning the configurator:
>
>1) The PreparedStatementAppender contains objects that are also
>configured. E.g.
>
><appender name="X" class="org.apache.log4j.jdbc.PreparedStatementAppender">
> <connectionSource class="org.apache.log4j.jdbc.UrlConnectionSource">
> <param name="driver" value="com.mysql.jdbc.Driver" />
> <param name="url" value="jdbc:mysql://localhost:3306/bjea" />
> <param name="username" value="bjea" />
> <param name="password" value="bjea" />
> </connectionSource>
></appender>
>
>The UrlConnectionSource implements ConnectionSource, which extends
>OptionHandler. PreparedStatementAppender also extends OptionHandler. All
>of the properties are set as expected. However, I noticed that while
>PreparedStatementAppender.activateOptions() is called by the configurator,
>ConnectionSource.activateOptions() is not. That is, I had to explicitly
>add a call to ConnectionSource.activateOptions() in
>PreparedStatementAppender.activateOptions(). I was wondering if I am
>doing something wrong, or if this was the desired behavior of the
>configurator and I wanted to propose changing it so that the
>activateOptions() is always called by the configurator.
While I was coding the new file rollover code, a similar question came
up. The reason why the activateOptions method of a sub-component is
not called is probably because I forgot to do it. However, omission
aside, that is likely to be the correct thing to do because the order
of invocation of the activateOptions method might matter (parent
component first or sub-component first?). Leaving this responsibility
to the parent component is quite adequate because the parent component
knows its subcomponents and can determine in which order to call them.
In summary, the way you have done is correct.
>2) In the JNDI-based ConnectionSource I will need to construct an
>InitialContext. Usually an application doesn't set any properties for the
>InitialContext explicitly and simply depends on there being a
>jndi.properties file or the like. However, it may be that whatever JNDI
>settings are appropriate for the application are not appropriate for the
>logging piece of the application. So I have the following questions:
> a) Is there a mechanism already set up for setting the JNDI
> properties for use within log4j separately from the main app?
> b) Assuming the answer to a) is no, is there a way to set
> properties using the configurator where name of the property is not fixed
> at compile time? That is, my class will contain a java.util.Properties
> object and I would like for the end-user to be able to add any property
> they wish into the properties. I can think of a couple of ways to do this:
> i) Many <param> tags with the same name attribute:
>
><appender name="X" class="org.apache.log4j.jdbc.PreparedStatementAppender">
> <connectionSource class="org.apache.log4j.jdbc.JNDIConnectionSource">
> <param name="property" value="foo=bar" />
> <param name="property" value="abc=xyz" />
> <param name="property" value="time=now" />
> </connectionSource>
></appender>
>
> ii) One <param> tag with large value:
>
><appender name="X" class="org.apache.log4j.jdbc.PreparedStatementAppender">
> <connectionSource class="org.apache.log4j.jdbc.JNDIConnectionSource">
> <param name="property">
><!-- Does the configurator support having the value as contents? -->
>foo=bar
>abc=xyz
>time=now
> </param>
> </connectionSource>
></appender>
>
> iii) Many <param> tags with multiple values:
>
><appender name="X" class="org.apache.log4j.jdbc.PreparedStatementAppender">
> <connectionSource class="org.apache.log4j.jdbc.JNDIConnectionSource">
> <param name="property" arg1="foo" arg2="bar" />
> <param name="property" arg1="abc" arg2="xyz" />
> <param name="property" arg1="time" arg2="now" />
> </connectionSource>
></appender>
>
>I'm not sure that any of these are supported; perhaps there is another way?
None of the variants are supported. This is where dynamic rules come in
handy as opposed to compile time rules we have now.
>Thanks,
>Ray
--
Ceki For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
Configurator questions
Posted by Raymond DeCampo <rd...@twcny.rr.com>.
Hello,
I am working on a JNDI-based ConnectionSource for the
PreparedStatementAppender I have been working on and I have a couple of
questions concerning the configurator:
1) The PreparedStatementAppender contains objects that are also
configured. E.g.
<appender name="X" class="org.apache.log4j.jdbc.PreparedStatementAppender">
<connectionSource class="org.apache.log4j.jdbc.UrlConnectionSource">
<param name="driver" value="com.mysql.jdbc.Driver" />
<param name="url" value="jdbc:mysql://localhost:3306/bjea" />
<param name="username" value="bjea" />
<param name="password" value="bjea" />
</connectionSource>
</appender>
The UrlConnectionSource implements ConnectionSource, which extends
OptionHandler. PreparedStatementAppender also extends OptionHandler.
All of the properties are set as expected. However, I noticed that
while PreparedStatementAppender.activateOptions() is called by the
configurator, ConnectionSource.activateOptions() is not. That is, I had
to explicitly add a call to ConnectionSource.activateOptions() in
PreparedStatementAppender.activateOptions(). I was wondering if I am
doing something wrong, or if this was the desired behavior of the
configurator and I wanted to propose changing it so that the
activateOptions() is always called by the configurator.
2) In the JNDI-based ConnectionSource I will need to construct an
InitialContext. Usually an application doesn't set any properties for
the InitialContext explicitly and simply depends on there being a
jndi.properties file or the like. However, it may be that whatever JNDI
settings are appropriate for the application are not appropriate for the
logging piece of the application. So I have the following questions:
a) Is there a mechanism already set up for setting the JNDI properties
for use within log4j separately from the main app?
b) Assuming the answer to a) is no, is there a way to set properties
using the configurator where name of the property is not fixed at
compile time? That is, my class will contain a java.util.Properties
object and I would like for the end-user to be able to add any property
they wish into the properties. I can think of a couple of ways to do this:
i) Many <param> tags with the same name attribute:
<appender name="X" class="org.apache.log4j.jdbc.PreparedStatementAppender">
<connectionSource class="org.apache.log4j.jdbc.JNDIConnectionSource">
<param name="property" value="foo=bar" />
<param name="property" value="abc=xyz" />
<param name="property" value="time=now" />
</connectionSource>
</appender>
ii) One <param> tag with large value:
<appender name="X" class="org.apache.log4j.jdbc.PreparedStatementAppender">
<connectionSource class="org.apache.log4j.jdbc.JNDIConnectionSource">
<param name="property">
<!-- Does the configurator support having the value as contents? -->
foo=bar
abc=xyz
time=now
</param>
</connectionSource>
</appender>
iii) Many <param> tags with multiple values:
<appender name="X" class="org.apache.log4j.jdbc.PreparedStatementAppender">
<connectionSource class="org.apache.log4j.jdbc.JNDIConnectionSource">
<param name="property" arg1="foo" arg2="bar" />
<param name="property" arg1="abc" arg2="xyz" />
<param name="property" arg1="time" arg2="now" />
</connectionSource>
</appender>
I'm not sure that any of these are supported; perhaps there is another way?
Thanks,
Ray
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org