users
[Top] [All Lists]

Re: [cinjug-users] Log4J event has commas inside Long integers

To: "twcrone@xxxxxxxxxxxxx" <twcrone@xxxxxxxxxxxxx>
Subject: Re: [cinjug-users] Log4J event has commas inside Long integers
From: "James Carman" <james@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Dec 2007 14:25:21 -0500
Cc: users@xxxxxxxxxx
Delivered-to: mailing list users@xxxxxxxxxx
In-reply-to: <f75bb686ca1f.475feace@xxxxxxxxxxxxx>
Mailing-list: contact users-help@xxxxxxxxxx; run by ezmlm
References: <f6f6deb1c03c.475fa158@xxxxxxxxxxxxx> <f2e8eedf0712120606gb6dee49rd260eafbd1c00e07@xxxxxxxxxxxxxx> <f58e8bde98c6.475faeb4@xxxxxxxxxxxxx> <f2e8eedf0712120651v6fd8a01h77304ca9607eb425@xxxxxxxxxxxxxx> <f75bb686ca1f.475feace@xxxxxxxxxxxxx>
Sender: jcarman@xxxxxxxxxxxxxxxxxxxx
I figured it was something like that, because log4j doesn't do any
numeric formatting itself, unless you use a custom renderer (that's
why I asked if you were passing in the Long by itself, because you
could have had a renderer registered for the java.lang.Long type).

On 12/12/07, twcrone@xxxxxxxxxxxxx <twcrone@xxxxxxxxxxxxx> wrote:
> We found it.  We were using a java.text.MessageFormat with this template:
>
> String MESSAGE_TEMPLATE = "{0}@@{1}@@{2}"
>
> The 0 was a Long that was being formatted for readability apparently when
> was an easy fix by just explicitly creating the message without the
> formatter.
>
> Thanks,
>
> - Todd
>
> ----- Original Message -----
> From: James Carman <james@xxxxxxxxxxxxxxxxxxxx>
> Date: Wednesday, December 12, 2007 9:52
> Subject: Re: [cinjug-users] Log4J event has commas inside Long integers
> To: "twcrone@xxxxxxxxxxxxx" <twcrone@xxxxxxxxxxxxx>
> Cc: users@xxxxxxxxxx
>
> > Can you share your log4j.properties file contents and maybe some
> > example log statements (with necessary context code) that are causing
> > the problem?
> >
> >
> >
> > On 12/12/07, twcrone@xxxxxxxxxxxxx <twcrone@xxxxxxxxxxxxx> wrote:
> > > It is in a longer string (e.g."1,099@@taskType@@Descriptive
> > text here.")
> > >
> > >
> > > ----- Original Message -----
> > > From: James Carman <james@xxxxxxxxxxxxxxxxxxxx>
> > > Date: Wednesday, December 12, 2007 9:07
> > > Subject: Re: [cinjug-users] Log4J event has commas inside Long
> > integers> To: "twcrone@xxxxxxxxxxxxx" <twcrone@xxxxxxxxxxxxx>
> > > Cc: users@xxxxxxxxxx
> > >
> > > > Are you just logging the Long by itself, or is it contained
> > > > within a
> > > > longer string (something like "processing " + id)?
> > > >
> > > > On 12/12/07, twcrone@xxxxxxxxxxxxx
> > <twcrone@xxxxxxxxxxxxx> wrote:
> > > > > Has anyone ever had a problem with a Log4J logging event
> > > > containing commas
> > > > > (and maybe even some extra spaces) in a Long integer ID.
> > > > Seems like there
> > > > > should be a way to configure it to not add commas to integers
> > > > even in the
> > > > > output or something.  Right now we simply strip them but
> > > > that is a temp fix.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > - Todd
> > > > >
> > > >
> >
> > ---------
> > You may unsubscribe from this mailing list
> > by sending a blank email addressed to:
> > users-unsubscribe@xxxxxxxxxx
> >
> > --
> > Find additional help by sending a blank email
> > addressed to:
> > users-help@xxxxxxxxxx
> >

<Prev in Thread] Current Thread [Next in Thread>