You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Asif Mekrani <as...@gmail.com> on 2007/03/06 09:20:42 UTC

log4J MDC

Hi All,

How can i print all the parameter in the MDC. I try some thing like this in
my log4J file:

%X{parameterKey} and this gets print. but, when i want to print more than
one parameter how should it. can some body tell me the syntax.

Thanks in advance.

Smiles,
Asif

Re: log4J MDC

Posted by James Stauffer <st...@gmail.com>.
You are correct.  I thought you were asking to do something like %X to
have everything printed without specifing each key. :-)

On 3/7/07, Asif Mekrani <as...@gmail.com> wrote:
> Hi James,
>
> I found the way,
>
> It is %X{parameterKey1} %X{parameterKey2} %X{parameterKey3}.
>
> -Asif
>
> On 3/6/07, James Stauffer <st...@gmail.com> wrote:
> >
> > According to the javadocs there isn't a way to print everything.  You
> > must list every key.
> >
> > On 3/6/07, Asif Mekrani <as...@gmail.com> wrote:
> > > Hi All,
> > >
> > > How can i print all the parameter in the MDC. I try some thing like this
> > in
> > > my log4J file:
> > >
> > > %X{parameterKey} and this gets print. but, when i want to print more
> > than
> > > one parameter how should it. can some body tell me the syntax.
> > >
> > > Thanks in advance.
> > >
> > > Smiles,
> > > Asif
> > >
> >
> >
> > --
> > James Stauffer        http://www.geocities.com/stauffer_james/
> > Are you good? Take the test at http://www.livingwaters.com/good/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>


-- 
James Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

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


Re: log4J MDC

Posted by Asif Mekrani <as...@gmail.com>.
Hi James,

I found the way,

It is %X{parameterKey1} %X{parameterKey2} %X{parameterKey3}.

-Asif

On 3/6/07, James Stauffer <st...@gmail.com> wrote:
>
> According to the javadocs there isn't a way to print everything.  You
> must list every key.
>
> On 3/6/07, Asif Mekrani <as...@gmail.com> wrote:
> > Hi All,
> >
> > How can i print all the parameter in the MDC. I try some thing like this
> in
> > my log4J file:
> >
> > %X{parameterKey} and this gets print. but, when i want to print more
> than
> > one parameter how should it. can some body tell me the syntax.
> >
> > Thanks in advance.
> >
> > Smiles,
> > Asif
> >
>
>
> --
> James Stauffer        http://www.geocities.com/stauffer_james/
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Re: log4J MDC

Posted by James Stauffer <st...@gmail.com>.
According to the javadocs there isn't a way to print everything.  You
must list every key.

On 3/6/07, Asif Mekrani <as...@gmail.com> wrote:
> Hi All,
>
> How can i print all the parameter in the MDC. I try some thing like this in
> my log4J file:
>
> %X{parameterKey} and this gets print. but, when i want to print more than
> one parameter how should it. can some body tell me the syntax.
>
> Thanks in advance.
>
> Smiles,
> Asif
>


-- 
James Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

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