[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-dev
Subject:    mdc class
From:       "Post, Richard (HQP)" <Richard.Post () rhi ! com>
Date:       2001-06-18 19:40:35
[Download RAW message or body]

The current NDC class doesn't really use the stack in the traditional sense
since every 'push' simply concatenates the new string to the end of the
existing string.

Couldn't the same thing be accomplished by foregoing the stack altogether
and just concatenating the new string to the existing string?

A 'pop' would remove the last string from the concatenated list. It might be
necessary to use a second string that contained a concatenated list of the
length of the strings.

Thus the actual string might be 'first string second string third string'
and the second string would be '12 13 12'. The lengths would be used to
determine where the substring is that is being removed (since strings can
have embedded spaces). The second string could also be given as '12 25 37'
to make it easier to remove the last element.

Rick

-----Original Message-----
From: Ceki Gülcü [mailto:cgu@qos.ch]
Sent: Monday, June 18, 2001 12:14 PM
To: LOG4J Developers Mailing List
Subject: Re: Plan for release 1.2


Mathias,

This is a classical backward compatibility technique. If you can't ensure
backward compatibility, then leave the old class alone and create a new one.
Those who want NDC can still use it in JDK 1.1. Those who decide to use MDC
need JDK 1.2+. Does that make sense? Ceki

At 20:32 18.06.2001 +0200, you wrote:
>Why use a new class MDC? NDC = Nested Diag... but can also be Named Diag...
>(which I like better than Mapped).
>We could create a second put method (String, String or Object, Object) for
>the NDC class that implements the same functionality. Only the theadlocal
>would be a problem.....no?
>
>Mathias
>
>
>----- Original Message -----
>From: "Ceki Gülcü" <cgu@qos.ch>
>To: <log4j-dev@jakarta.apache.org>
>Sent: Monday, June 18, 2001 3:33 PM
>Subject: Plan for release 1.2
>
>
>>
>> Hello all,
>>
>> I have written a short release plan for log4j 1.2. It is available at
>>
>>   http://jakarta.apache.org/log4j/docs/plan.html
>>
>> You are most welcome to make suggestions and even more to volunteer. :-)
>>
>> Cheers, Ceki
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

--
Ceki Gülcü


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>mdc class</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>The current NDC class doesn't really use the stack in the traditional \
sense since every 'push' simply concatenates the new string to the end of the \
existing string.</FONT></P>

<P><FONT SIZE=2>Couldn't the same thing be accomplished by foregoing the stack \
altogether and just concatenating the new string to the existing string?</FONT></P>

<P><FONT SIZE=2>A 'pop' would remove the last string from the concatenated list. It \
might be necessary to use a second string that contained a concatenated list of the \
length of the strings.</FONT></P>

<P><FONT SIZE=2>Thus the actual string might be 'first string second string third \
string' and the second string would be '12 13 12'. The lengths would be used to \
determine where the substring is that is being removed (since strings can have \
embedded spaces). The second string could also be given as '12 25 37' to make it \
easier to remove the last element.</FONT></P>

<P><FONT SIZE=2>Rick</FONT>
</P>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Ceki Gülcü [<A \
HREF="mailto:cgu@qos.ch">mailto:cgu@qos.ch</A>]</FONT> <BR><FONT SIZE=2>Sent: Monday, \
June 18, 2001 12:14 PM</FONT> <BR><FONT SIZE=2>To: LOG4J Developers Mailing \
List</FONT> <BR><FONT SIZE=2>Subject: Re: Plan for release 1.2</FONT>
</P>
<BR>

<P><FONT SIZE=2>Mathias,</FONT>
</P>

<P><FONT SIZE=2>This is a classical backward compatibility technique. If you can't \
ensure backward compatibility, then leave the old class alone and create a new one. \
Those who want NDC can still use it in JDK 1.1. Those who decide to use MDC need JDK \
1.2+. Does that make sense? Ceki</FONT></P>

<P><FONT SIZE=2>At 20:32 18.06.2001 +0200, you wrote:</FONT>
<BR><FONT SIZE=2>&gt;Why use a new class MDC? NDC = Nested Diag... but can also be \
Named Diag...</FONT> <BR><FONT SIZE=2>&gt;(which I like better than Mapped).</FONT>
<BR><FONT SIZE=2>&gt;We could create a second put method (String, String or Object, \
Object) for</FONT> <BR><FONT SIZE=2>&gt;the NDC class that implements the same \
functionality. Only the theadlocal</FONT> <BR><FONT SIZE=2>&gt;would be a \
problem.....no?</FONT> <BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;Mathias</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;----- Original Message -----</FONT>
<BR><FONT SIZE=2>&gt;From: &quot;Ceki Gülcü&quot; &lt;cgu@qos.ch&gt;</FONT>
<BR><FONT SIZE=2>&gt;To: &lt;log4j-dev@jakarta.apache.org&gt;</FONT>
<BR><FONT SIZE=2>&gt;Sent: Monday, June 18, 2001 3:33 PM</FONT>
<BR><FONT SIZE=2>&gt;Subject: Plan for release 1.2</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; Hello all,</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; I have written a short release plan for log4j 1.2. It is \
available at</FONT> <BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt;&nbsp;&nbsp; <A \
HREF="http://jakarta.apache.org/log4j/docs/plan.html" \
TARGET="_blank">http://jakarta.apache.org/log4j/docs/plan.html</A></FONT> <BR><FONT \
SIZE=2>&gt;&gt;</FONT> <BR><FONT SIZE=2>&gt;&gt; You are most welcome to make \
suggestions and even more to volunteer. :-)</FONT> <BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; Cheers, Ceki</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; \
---------------------------------------------------------------------</FONT> \
<BR><FONT SIZE=2>&gt;&gt; To unsubscribe, e-mail: \
log4j-dev-unsubscribe@jakarta.apache.org</FONT> <BR><FONT SIZE=2>&gt;&gt; For \
additional commands, e-mail: log4j-dev-help@jakarta.apache.org</FONT> <BR><FONT \
SIZE=2>&gt;&gt;</FONT> <BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;---------------------------------------------------------------------</FONT>
 <BR><FONT SIZE=2>&gt;To unsubscribe, e-mail: \
log4j-dev-unsubscribe@jakarta.apache.org</FONT> <BR><FONT SIZE=2>&gt;For additional \
commands, e-mail: log4j-dev-help@jakarta.apache.org</FONT> </P>

<P><FONT SIZE=2>--</FONT>
<BR><FONT SIZE=2>Ceki Gülcü</FONT>
</P>
<BR>

<P><FONT SIZE=2>---------------------------------------------------------------------</FONT>
 <BR><FONT SIZE=2>To unsubscribe, e-mail: \
log4j-dev-unsubscribe@jakarta.apache.org</FONT> <BR><FONT SIZE=2>For additional \
commands, e-mail: log4j-dev-help@jakarta.apache.org</FONT> </P>

</BODY>
</HTML>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic