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
> >
|