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 "Konduru, Geetha" <Ge...@medco.com> on 2011/09/14 21:38:20 UTC

log4j----Edit the event received

Hi,

 

  What I am looking for is, every event received by SocketAppender, even
before it send to remote machine, it must append  to the event(on which
log4j is running).

 

  Can any one please tell me a solution for this. 

 

Example: if application(running on machine HOSTNAME) logs message "I am
a Logging event", than SOCKET APPENDER must send following to REMOTE
machine(or SOCKET RECEIVER on Remote machine should receive following as
log message).

 

"HOSTNAME:I am a Logging event"  

 

 

 

 

 

 

Thank U,

VGSS

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
I see following WARNINGS

 

log4j:WARN Continuable parsing error 19 and column 97

log4j:WARN Element type "rewritePolicy" must be declared.

log4j:WARN Continuable parsing error 22 and column 12

log4j:WARN The content of element type "appender" must match
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
?,layout?,filter*,appender-ref*)".

 

 

Following is config

 

<appender name="rewrite"
class="org.apache.log4j.rewrite.RewriteAppender">

    <appender name="socket" class="org.apache.log4j.net.SocketAppender">

      <param name="Port" value="12346"/>

      <param name="RemoteHost" value="localhost"/>

      <param name="Application" value="app1"/>

      <param name="ReconnectionDelay" value="60000"/>

      <param name="Threshold" value="ALL"/>

    </appender>

    <rewritePolicy name="propertyPolicy"
class="org.apache.log4j.rewrite.PropertyRewritePolicy"> ////This is line
number 19

        <param name="properties" value="logFile=server2.log"/>

    </rewritePolicy>

</appender>////This is line number 22

 

 

I included following jars( which in chainsaw) in my classpath

  1.extras

  2. receivers

  3.components

 

 

 

Thanks a Lot

VGSS

 

 

-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Thursday, September 15, 2011 12:30 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

 

Chainsaw includes those jars in its standalone zip.

 

The extras companion has been released:

http://logging.apache.org/log4j/companions/extras/download.html

 

The receivers and component companions have not yet been officially

released, so you would have to build them from source if you didn't use
the

jars from the chainsaw zip.

 

http://logging.apache.org/log4j/companions/component/index.html

http://logging.apache.org/log4j/companions/receivers/index.html

 

Scott

 

On Wed, Sep 14, 2011 at 7:25 PM, Konduru, Geetha

<Ge...@medco.com>wrote:

 

> Where can I download the receivers companion jar, component companion

> jar  and extra companion jar.

> 

> Thank U,

> VGSS

> 

> 

> -----Original Message-----

> From: Scott Deboy [mailto:scott.deboy@gmail.com]

> Sent: Wednesday, September 14, 2011 4:50 PM

> To: Log4J Users List

> Subject: Re: log4j----Edit the event received

> 

> There are only three unique attributes provided for socket-received

> events:

> hostname

> remoteSourceInfo

> application (if set on appender)

> 

> If you can't leverage application and would like to use additional

> properties to identify instances, there is a mechanism that supports

> that

> (via configuration): RewriteAppender

> 

> RewriteAppender allows you to modify event attributes (or add

> properties)

> before sending the event to the appender.

> 

> A RewriteAppender expects a nested appender (your SocketAppender) and
a

> RewritePolicy.

> 

> You can use a PropertyRewritePolicy as a quick way to add custom

> properties

> to each event.

> 

> This requires you to add the receivers companion jar and probably

> component

> companion jar (not sure about extras companion) to your appender side.

> 

>
http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/

> log4j/rewrite/RewriteAppender.html

>
http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/

> log4j/rewrite/RewritePolicy.html

> 

> Example configuration (didn't run this, but it should be correct) that

> will

> add two properties to each event, somepropertyname1 and

> somepropertyname2.

> 

> <appender name="rewrite"

> class="org.apache.log4j.rewrite.RewriteAppender">

>    <appender name="socket"
class="org.apache.log4j.net.SocketAppender">

>      <param name="Port" value="12346"/>

>      <param name="RemoteHost" value="localhost"/>

>      <param name="Application" value="app1"/>

>      <param name="ReconnectionDelay" value="60000"/>

>      <param name="Threshold" value="ALL"/>

>    </appender>

>    <RewritePolicy name="propertyPolicy"

> class="org.apache.log4j.rewrite.PropertyRewritePolicy">

>        <param name="properties"

>
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper

> tyvalue2">

>    </RewritePolicy>

> </appender>

> 

> Scott

> 

> 

> On Wed, Sep 14, 2011 at 1:29 PM, Konduru, Geetha

> <Ge...@medco.com>wrote:

> 

> > Actually  issue is , We have 100 server instances running on 20

> > different machines (5 instances per machine).

> >

> > We want to merge and see them,

> >

> > When I merge , seeing " log4j.remoteSourceInfo"   I can say
particular

> > logging event is generated by server instances running on one

> particular

> > machine, Is there a way to figure out which particular Instance out
of

> 5

> > instances running on that particular machine.

> >

> > Thank u,

> > VGSS

> >

> > -----Original Message-----

> > From: Scott Deboy [mailto:scott.deboy@gmail.com]

> > Sent: Wednesday, September 14, 2011 4:15 PM

> > To: Log4J Users List

> > Subject: Re: log4j----Edit the event received

> >

> > The SocketReceiver adds two properties to each event:

> > hostname

> > log4j.remoteSourceInfo

> >

> > With the developer snapshot of Chainsaw you should see those as

> > individual

> > columns in the table.  If they aren't displayed by default you can

> > enable

> > them via the tab preferences menu (select Columns).

> >

> > Scott

> >

> > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha

> > <Ge...@medco.com>wrote:

> >

> > > Hi,

> > >

> > >

> > >

> > >  What I am looking for is, every event received by SocketAppender,

> > even

> > > before it send to remote machine, it must append  to the event(on

> > which

> > > log4j is running).

> > >

> > >

> > >

> > >  Can any one please tell me a solution for this.

> > >

> > >

> > >

> > > Example: if application(running on machine HOSTNAME) logs message
"I

> > am

> > > a Logging event", than SOCKET APPENDER must send following to
REMOTE

> > > machine(or SOCKET RECEIVER on Remote machine should receive

> following

> > as

> > > log message).

> > >

> > >

> > >

> > > "HOSTNAME:I am a Logging event"

> > >

> > >

> > >

> > >

> > >

> > >

> > >

> > >

> > >

> > >

> > >

> > >

> > >

> > > Thank U,

> > >

> > > VGSS

> > >

> > >

> **********************************************************************

> > > This e-mail message and any attachments contain confidential

> > information

> > > from Medco. If you are not the intended recipient, you are hereby

> > notified

> > > that disclosure, printing, copying, distribution, or the taking of

> any

> > > action in reliance on the contents of this electronic information
is

> > > strictly prohibited. If you have received this e-mail message in

> > error,

> > > please immediately notify the sender by reply message and then

> delete

> > the

> > > electronic message and any attachments.

> > >

> >

> >
**********************************************************************

> > This e-mail message and any attachments contain confidential

> information

> > from Medco. If you are not the intended recipient, you are hereby

> notified

> > that disclosure, printing, copying, distribution, or the taking of
any

> > action in reliance on the contents of this electronic information is

> > strictly prohibited. If you have received this e-mail message in

> error,

> > please immediately notify the sender by reply message and then
delete

> the

> > electronic message and any attachments.

> >

> >
---------------------------------------------------------------------

> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org

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

> >

> >

> 

> **********************************************************************

> This e-mail message and any attachments contain confidential
information

> from Medco. If you are not the intended recipient, you are hereby
notified

> that disclosure, printing, copying, distribution, or the taking of any

> action in reliance on the contents of this electronic information is

> strictly prohibited. If you have received this e-mail message in
error,

> please immediately notify the sender by reply message and then delete
the

> electronic message and any attachments.

> 

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org

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

> 

> 

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

Re: log4j----Edit the event received

Posted by Scott Deboy <sc...@gmail.com>.
Chainsaw includes those jars in its standalone zip.

The extras companion has been released:
http://logging.apache.org/log4j/companions/extras/download.html

The receivers and component companions have not yet been officially
released, so you would have to build them from source if you didn't use the
jars from the chainsaw zip.

http://logging.apache.org/log4j/companions/component/index.html
http://logging.apache.org/log4j/companions/receivers/index.html

Scott

On Wed, Sep 14, 2011 at 7:25 PM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Where can I download the receivers companion jar, component companion
> jar  and extra companion jar.
>
> Thank U,
> VGSS
>
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Wednesday, September 14, 2011 4:50 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> There are only three unique attributes provided for socket-received
> events:
> hostname
> remoteSourceInfo
> application (if set on appender)
>
> If you can't leverage application and would like to use additional
> properties to identify instances, there is a mechanism that supports
> that
> (via configuration): RewriteAppender
>
> RewriteAppender allows you to modify event attributes (or add
> properties)
> before sending the event to the appender.
>
> A RewriteAppender expects a nested appender (your SocketAppender) and a
> RewritePolicy.
>
> You can use a PropertyRewritePolicy as a quick way to add custom
> properties
> to each event.
>
> This requires you to add the receivers companion jar and probably
> component
> companion jar (not sure about extras companion) to your appender side.
>
> http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/
> log4j/rewrite/RewriteAppender.html
> http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/
> log4j/rewrite/RewritePolicy.html
>
> Example configuration (didn't run this, but it should be correct) that
> will
> add two properties to each event, somepropertyname1 and
> somepropertyname2.
>
> <appender name="rewrite"
> class="org.apache.log4j.rewrite.RewriteAppender">
>    <appender name="socket" class="org.apache.log4j.net.SocketAppender">
>      <param name="Port" value="12346"/>
>      <param name="RemoteHost" value="localhost"/>
>      <param name="Application" value="app1"/>
>      <param name="ReconnectionDelay" value="60000"/>
>      <param name="Threshold" value="ALL"/>
>    </appender>
>    <RewritePolicy name="propertyPolicy"
> class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>        <param name="properties"
> value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> tyvalue2">
>    </RewritePolicy>
> </appender>
>
> Scott
>
>
> On Wed, Sep 14, 2011 at 1:29 PM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > Actually  issue is , We have 100 server instances running on 20
> > different machines (5 instances per machine).
> >
> > We want to merge and see them,
> >
> > When I merge , seeing " log4j.remoteSourceInfo"   I can say particular
> > logging event is generated by server instances running on one
> particular
> > machine, Is there a way to figure out which particular Instance out of
> 5
> > instances running on that particular machine.
> >
> > Thank u,
> > VGSS
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Wednesday, September 14, 2011 4:15 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > The SocketReceiver adds two properties to each event:
> > hostname
> > log4j.remoteSourceInfo
> >
> > With the developer snapshot of Chainsaw you should see those as
> > individual
> > columns in the table.  If they aren't displayed by default you can
> > enable
> > them via the tab preferences menu (select Columns).
> >
> > Scott
> >
> > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > Hi,
> > >
> > >
> > >
> > >  What I am looking for is, every event received by SocketAppender,
> > even
> > > before it send to remote machine, it must append  to the event(on
> > which
> > > log4j is running).
> > >
> > >
> > >
> > >  Can any one please tell me a solution for this.
> > >
> > >
> > >
> > > Example: if application(running on machine HOSTNAME) logs message "I
> > am
> > > a Logging event", than SOCKET APPENDER must send following to REMOTE
> > > machine(or SOCKET RECEIVER on Remote machine should receive
> following
> > as
> > > log message).
> > >
> > >
> > >
> > > "HOSTNAME:I am a Logging event"
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Thank U,
> > >
> > > VGSS
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> >
> > **********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then delete
> the
> > electronic message and any attachments.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in error,
> please immediately notify the sender by reply message and then delete the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
Where can I download the receivers companion jar, component companion
jar  and extra companion jar.

Thank U,
VGSS


-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Wednesday, September 14, 2011 4:50 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

There are only three unique attributes provided for socket-received
events:
hostname
remoteSourceInfo
application (if set on appender)

If you can't leverage application and would like to use additional
properties to identify instances, there is a mechanism that supports
that
(via configuration): RewriteAppender

RewriteAppender allows you to modify event attributes (or add
properties)
before sending the event to the appender.

A RewriteAppender expects a nested appender (your SocketAppender) and a
RewritePolicy.

You can use a PropertyRewritePolicy as a quick way to add custom
properties
to each event.

This requires you to add the receivers companion jar and probably
component
companion jar (not sure about extras companion) to your appender side.

http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/
log4j/rewrite/RewriteAppender.html
http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/
log4j/rewrite/RewritePolicy.html

Example configuration (didn't run this, but it should be correct) that
will
add two properties to each event, somepropertyname1 and
somepropertyname2.

<appender name="rewrite"
class="org.apache.log4j.rewrite.RewriteAppender">
    <appender name="socket" class="org.apache.log4j.net.SocketAppender">
      <param name="Port" value="12346"/>
      <param name="RemoteHost" value="localhost"/>
      <param name="Application" value="app1"/>
      <param name="ReconnectionDelay" value="60000"/>
      <param name="Threshold" value="ALL"/>
    </appender>
    <RewritePolicy name="propertyPolicy"
class="org.apache.log4j.rewrite.PropertyRewritePolicy">
        <param name="properties"
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
tyvalue2">
    </RewritePolicy>
</appender>

Scott


On Wed, Sep 14, 2011 at 1:29 PM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Actually  issue is , We have 100 server instances running on 20
> different machines (5 instances per machine).
>
> We want to merge and see them,
>
> When I merge , seeing " log4j.remoteSourceInfo"   I can say particular
> logging event is generated by server instances running on one
particular
> machine, Is there a way to figure out which particular Instance out of
5
> instances running on that particular machine.
>
> Thank u,
> VGSS
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Wednesday, September 14, 2011 4:15 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> The SocketReceiver adds two properties to each event:
> hostname
> log4j.remoteSourceInfo
>
> With the developer snapshot of Chainsaw you should see those as
> individual
> columns in the table.  If they aren't displayed by default you can
> enable
> them via the tab preferences menu (select Columns).
>
> Scott
>
> On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > Hi,
> >
> >
> >
> >  What I am looking for is, every event received by SocketAppender,
> even
> > before it send to remote machine, it must append  to the event(on
> which
> > log4j is running).
> >
> >
> >
> >  Can any one please tell me a solution for this.
> >
> >
> >
> > Example: if application(running on machine HOSTNAME) logs message "I
> am
> > a Logging event", than SOCKET APPENDER must send following to REMOTE
> > machine(or SOCKET RECEIVER on Remote machine should receive
following
> as
> > log message).
> >
> >
> >
> > "HOSTNAME:I am a Logging event"
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Thank U,
> >
> > VGSS
> >
> >
**********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of
any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then
delete
> the
> > electronic message and any attachments.
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


Re: log4j----Edit the event received

Posted by Scott Deboy <sc...@gmail.com>.
There are only three unique attributes provided for socket-received events:
hostname
remoteSourceInfo
application (if set on appender)

If you can't leverage application and would like to use additional
properties to identify instances, there is a mechanism that supports that
(via configuration): RewriteAppender

RewriteAppender allows you to modify event attributes (or add properties)
before sending the event to the appender.

A RewriteAppender expects a nested appender (your SocketAppender) and a
RewritePolicy.

You can use a PropertyRewritePolicy as a quick way to add custom properties
to each event.

This requires you to add the receivers companion jar and probably component
companion jar (not sure about extras companion) to your appender side.

http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/log4j/rewrite/RewriteAppender.html
http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/log4j/rewrite/RewritePolicy.html

Example configuration (didn't run this, but it should be correct) that will
add two properties to each event, somepropertyname1 and somepropertyname2.

<appender name="rewrite" class="org.apache.log4j.rewrite.RewriteAppender">
    <appender name="socket" class="org.apache.log4j.net.SocketAppender">
      <param name="Port" value="12346"/>
      <param name="RemoteHost" value="localhost"/>
      <param name="Application" value="app1"/>
      <param name="ReconnectionDelay" value="60000"/>
      <param name="Threshold" value="ALL"/>
    </appender>
    <RewritePolicy name="propertyPolicy"
class="org.apache.log4j.rewrite.PropertyRewritePolicy">
        <param name="properties"
value="somepropertyname1=somepropertyvalue1,somepropertyname2=somepropertyvalue2">
    </RewritePolicy>
</appender>

Scott


On Wed, Sep 14, 2011 at 1:29 PM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Actually  issue is , We have 100 server instances running on 20
> different machines (5 instances per machine).
>
> We want to merge and see them,
>
> When I merge , seeing " log4j.remoteSourceInfo"   I can say particular
> logging event is generated by server instances running on one particular
> machine, Is there a way to figure out which particular Instance out of 5
> instances running on that particular machine.
>
> Thank u,
> VGSS
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Wednesday, September 14, 2011 4:15 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> The SocketReceiver adds two properties to each event:
> hostname
> log4j.remoteSourceInfo
>
> With the developer snapshot of Chainsaw you should see those as
> individual
> columns in the table.  If they aren't displayed by default you can
> enable
> them via the tab preferences menu (select Columns).
>
> Scott
>
> On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > Hi,
> >
> >
> >
> >  What I am looking for is, every event received by SocketAppender,
> even
> > before it send to remote machine, it must append  to the event(on
> which
> > log4j is running).
> >
> >
> >
> >  Can any one please tell me a solution for this.
> >
> >
> >
> > Example: if application(running on machine HOSTNAME) logs message "I
> am
> > a Logging event", than SOCKET APPENDER must send following to REMOTE
> > machine(or SOCKET RECEIVER on Remote machine should receive following
> as
> > log message).
> >
> >
> >
> > "HOSTNAME:I am a Logging event"
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Thank U,
> >
> > VGSS
> >
> > **********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then delete
> the
> > electronic message and any attachments.
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in error,
> please immediately notify the sender by reply message and then delete the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
Actually  issue is , We have 100 server instances running on 20
different machines (5 instances per machine).

We want to merge and see them,

When I merge , seeing " log4j.remoteSourceInfo"   I can say particular
logging event is generated by server instances running on one particular
machine, Is there a way to figure out which particular Instance out of 5
instances running on that particular machine.

Thank u,
VGSS

-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Wednesday, September 14, 2011 4:15 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

The SocketReceiver adds two properties to each event:
hostname
log4j.remoteSourceInfo

With the developer snapshot of Chainsaw you should see those as
individual
columns in the table.  If they aren't displayed by default you can
enable
them via the tab preferences menu (select Columns).

Scott

On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Hi,
>
>
>
>  What I am looking for is, every event received by SocketAppender,
even
> before it send to remote machine, it must append  to the event(on
which
> log4j is running).
>
>
>
>  Can any one please tell me a solution for this.
>
>
>
> Example: if application(running on machine HOSTNAME) logs message "I
am
> a Logging event", than SOCKET APPENDER must send following to REMOTE
> machine(or SOCKET RECEIVER on Remote machine should receive following
as
> log message).
>
>
>
> "HOSTNAME:I am a Logging event"
>
>
>
>
>
>
>
>
>
>
>
>
>
> Thank U,
>
> VGSS
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
I tried rewritePolicy and RewritePolicy,  , But I get  warning message
saying element type  rewritePolicy (or RewritePolicy) must be declared.

Thank u,
VGSS



-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Wednesday, September 14, 2011 4:51 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

Missed the end param on the nested properties param...not sure about
case of
RewritePolicy node name..may be rewritePolicy.

<appender name="rewrite"
class="org.apache.log4j.rewrite.RewriteAppender">
    <appender name="socket" class="org.apache.log4j.net.SocketAppender">
      <param name="Port" value="12346"/>
      <param name="RemoteHost" value="localhost"/>
      <param name="Application" value="app1"/>
      <param name="ReconnectionDelay" value="60000"/>
      <param name="Threshold" value="ALL"/>
    </appender>
    <RewritePolicy name="propertyPolicy"
class="org.apache.log4j.rewrite.PropertyRewritePolicy">
        <param name="properties"
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
tyvalue2"/>
    </RewritePolicy>
</appender>


On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Thank U...
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Wednesday, September 14, 2011 4:31 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> remoteSourceInfo contains the connected port:
>
> hostName = socket.getInetAddress().getHostName();
> remoteInfo = hostName + ":" + socket.getPort();
>
> On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > yes, I got them
> >
> > how are "hostname" and " log4j.remoteSourceInfo"  different from
each
> > other....
> >
> > thank U
> > VGSS
> >
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Wednesday, September 14, 2011 4:15 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > The SocketReceiver adds two properties to each event:
> > hostname
> > log4j.remoteSourceInfo
> >
> > With the developer snapshot of Chainsaw you should see those as
> > individual
> > columns in the table.  If they aren't displayed by default you can
> > enable
> > them via the tab preferences menu (select Columns).
> >
> > Scott
> >
> > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > Hi,
> > >
> > >
> > >
> > >  What I am looking for is, every event received by SocketAppender,
> > even
> > > before it send to remote machine, it must append  to the event(on
> > which
> > > log4j is running).
> > >
> > >
> > >
> > >  Can any one please tell me a solution for this.
> > >
> > >
> > >
> > > Example: if application(running on machine HOSTNAME) logs message
"I
> > am
> > > a Logging event", than SOCKET APPENDER must send following to
REMOTE
> > > machine(or SOCKET RECEIVER on Remote machine should receive
> following
> > as
> > > log message).
> > >
> > >
> > >
> > > "HOSTNAME:I am a Logging event"
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Thank U,
> > >
> > > VGSS
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information
is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> >
> >
**********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of
any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then
delete
> the
> > electronic message and any attachments.
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
Would you please mail the <!DOCTYPE>   tag   you used.....

Thank U,
VGSS

-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Friday, September 16, 2011 3:03 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

I just tried this and it worked fine....I modified the Chainsaw config
file
I was using (anything received by Chainsaw can also be sent to appenders
defined in the same config)...configuration and example log file output
below:

Here's what I added to the Chainsaw config file:
   <appender name="F1" class="org.apache.log4j.FileAppender">
       <param name="file" value="c:/temp/file.txt"/>
       <param name="append" value="false"/>
       <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
p2:%X{p2}
%m%n"/>
       </layout>
     </appender>


     <appender name="A1"
class="org.apache.log4j.rewrite.RewriteAppender">
       <appender-ref ref="F1"/>
       <rewritePolicy
class="org.apache.log4j.rewrite.PropertyRewritePolicy">
         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
       </rewritePolicy>
     </appender>

   <root>
      <level value="debug"/>
       <appender-ref ref="A1" />
    </root>

And here is an example output line:
DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE   RI-
RI.DRI
 FATAL ERROR WARNING INFO


On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

> I tried this, its not working, following are warnings I get
>
>
>
>
>
> log4j:WARN Continuable parsing error 48 and column 80
>
> log4j:WARN Element type "rewritePolicy" must be declared.
>
> log4j:WARN Continuable parsing error 52 and column 14
>
> log4j:WARN The content of element type "appender" must match
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> ?,layout?,filter*,appender-ref*)".
>
>
>
>
>
> Adding an Appender to RewriteAppender is working fine, but assigning
> rewritePolicy to a RewriteAppender is failing.
>
>
>
>
>
> Thank U,
>
> VGSS
>
>
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Friday, September 16, 2011 1:48 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
>
>
> Here is an example from the tests in log4j:
>
>
>
>
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
>
c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> ev=564831
>
>
>
>     <appender name="F1" class="org.apache.log4j.FileAppender">
>
>       <param name="file" value="temp"/>
>
>       <param name="append" value="false"/>
>
>       <layout class="org.apache.log4j.PatternLayout">
>
>         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> p2:%X{p2}
>
> %m%n"/>
>
>       </layout>
>
>     </appender>
>
>
>
>
>
>     <appender name="A1"
> class="org.apache.log4j.rewrite.RewriteAppender">
>
>       <appender-ref ref="F1"/>
>
>       <rewritePolicy
>
> class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>
>         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
>
>       </rewritePolicy>
>
>     </appender>
>
>
>
>     <root>
>
>       <level value ="debug" />
>
>       <appender-ref ref="A1" />
>
>     </root>
>
>
>
> On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
>
> <Ge...@medco.com>wrote:
>
>
>
> > Would any one please give an example of xml configuration file with
>
> > Rewrite Appender.
>
> >
>
> > Thank U,
>
> > Vgss
>
> >
>
> > -----Original Message-----
>
> > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
>
> > Sent: Thursday, September 15, 2011 1:57 PM
>
> > To: Log4J Users List
>
> > Subject: RE: log4j----Edit the event received
>
> >
>
> > log4j: Trying to find [server2Rewritelog4j.xml] using context
>
> > classloader sun.misc.Launcher$AppClassLoader@601bb1.
>
> > log4j: Using URL
>
> > [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> for
>
> > automatic log4j configuration.
>
> > log4j: Preferred configurator class:
>
> > org.apache.log4j.xml.DOMConfigurator
>
> > log4j: System property is :null
>
> > log4j: Standard DocumentBuilderFactory search succeded.
>
> > log4j: DocumentBuilderFactory is:
>
> > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
>
> > log4j:WARN Continuable parsing error 19 and column 97
>
> > log4j:WARN Element type "rewritePolicy" must be declared.
>
> > log4j:WARN Continuable parsing error 22 and column 12
>
> > log4j:WARN The content of element type "appender" must match
>
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
>
> > ?,layout?,filter*,appender-ref*)".
>
> > log4j: debug attribute= "null".
>
> > log4j: Ignoring debug attribute.
>
> > log4j: reset attribute= "false".
>
> > log4j: Threshold ="null".
>
> > log4j: Level value for root is  [debug].
>
> > log4j: root level set to DEBUG
>
> > log4j: Class name: [org.apache.log4j.ConsoleAppender]
>
> > log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
>
> > log4j: Setting property [conversionPattern] to [[%d{ISO8601} %t %c]
>
> > %m%n].
>
> > log4j: Adding appender named [CA] to category [root]
>
> >
>
> > -----Original Message-----
>
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > Sent: Thursday, September 15, 2011 1:54 PM
>
> > To: Log4J Users List
>
> > Subject: Re: log4j----Edit the event received
>
> >
>
> > There is a DTD for core elements but alternate elements can be added
>
> > (like
>
> > rewritepolicy)...you won't find rewritepolicy in the DTD.
>
> >
>
> > Can you add -Dlog4j.debug=true to your appender-side java command,
and
>
> > paste
>
> > the output?
>
> >
>
> > Thanks
>
> >
>
> > Scott
>
> >
>
> > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
>
> > <Ge...@medco.com>wrote:
>
> >
>
> > > Where can I find XMLschema file for log4j XML configuration
file????
>
> > >
>
> > >
>
> > > Thank U,
>
> > > VGSS
>
> > >
>
> > > -----Original Message-----
>
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > > Sent: Wednesday, September 14, 2011 4:51 PM
>
> > > To: Log4J Users List
>
> > > Subject: Re: log4j----Edit the event received
>
> > >
>
> > > Missed the end param on the nested properties param...not sure
about
>
> > > case of
>
> > > RewritePolicy node name..may be rewritePolicy.
>
> > >
>
> > > <appender name="rewrite"
>
> > > class="org.apache.log4j.rewrite.RewriteAppender">
>
> > >    <appender name="socket"
>
> > class="org.apache.log4j.net.SocketAppender">
>
> > >      <param name="Port" value="12346"/>
>
> > >      <param name="RemoteHost" value="localhost"/>
>
> > >      <param name="Application" value="app1"/>
>
> > >      <param name="ReconnectionDelay" value="60000"/>
>
> > >      <param name="Threshold" value="ALL"/>
>
> > >    </appender>
>
> > >    <RewritePolicy name="propertyPolicy"
>
> > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>
> > >        <param name="properties"
>
> > >
>
> >
>
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
>
> > > tyvalue2"/>
>
> > >    </RewritePolicy>
>
> > > </appender>
>
> > >
>
> > >
>
> > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
>
> > > <Ge...@medco.com>wrote:
>
> > >
>
> > > > Thank U...
>
> > > >
>
> > > > -----Original Message-----
>
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > > > Sent: Wednesday, September 14, 2011 4:31 PM
>
> > > > To: Log4J Users List
>
> > > > Subject: Re: log4j----Edit the event received
>
> > > >
>
> > > > remoteSourceInfo contains the connected port:
>
> > > >
>
> > > > hostName = socket.getInetAddress().getHostName();
>
> > > > remoteInfo = hostName + ":" + socket.getPort();
>
> > > >
>
> > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
>
> > > > <Ge...@medco.com>wrote:
>
> > > >
>
> > > > > yes, I got them
>
> > > > >
>
> > > > > how are "hostname" and " log4j.remoteSourceInfo"  different
from
>
> > > each
>
> > > > > other....
>
> > > > >
>
> > > > > thank U
>
> > > > > VGSS
>
> > > > >
>
> > > > >
>
> > > > > -----Original Message-----
>
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > > > > Sent: Wednesday, September 14, 2011 4:15 PM
>
> > > > > To: Log4J Users List
>
> > > > > Subject: Re: log4j----Edit the event received
>
> > > > >
>
> > > > > The SocketReceiver adds two properties to each event:
>
> > > > > hostname
>
> > > > > log4j.remoteSourceInfo
>
> > > > >
>
> > > > > With the developer snapshot of Chainsaw you should see those
as
>
> > > > > individual
>
> > > > > columns in the table.  If they aren't displayed by default you
> can
>
> > > > > enable
>
> > > > > them via the tab preferences menu (select Columns).
>
> > > > >
>
> > > > > Scott
>
> > > > >
>
> > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
>
> > > > > <Ge...@medco.com>wrote:
>
> > > > >
>
> > > > > > Hi,
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >  What I am looking for is, every event received by
>
> > SocketAppender,
>
> > > > > even
>
> > > > > > before it send to remote machine, it must append  to the
>
> > event(on
>
> > > > > which
>
> > > > > > log4j is running).
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >  Can any one please tell me a solution for this.
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > > Example: if application(running on machine HOSTNAME) logs
>
> > message
>
> > > "I
>
> > > > > am
>
> > > > > > a Logging event", than SOCKET APPENDER must send following
to
>
> > > REMOTE
>
> > > > > > machine(or SOCKET RECEIVER on Remote machine should receive
>
> > > > following
>
> > > > > as
>
> > > > > > log message).
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > > "HOSTNAME:I am a Logging event"
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > > Thank U,
>
> > > > > >
>
> > > > > > VGSS
>
> > > > > >
>
> > > > > >
>
> > > >
>
> >
**********************************************************************
>
> > > > > > This e-mail message and any attachments contain confidential
>
> > > > > information
>
> > > > > > from Medco. If you are not the intended recipient, you are
>
> > hereby
>
> > > > > notified
>
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
>
> > of
>
> > > > any
>
> > > > > > action in reliance on the contents of this electronic
>
> > information
>
> > > is
>
> > > > > > strictly prohibited. If you have received this e-mail
message
> in
>
> > > > > error,
>
> > > > > > please immediately notify the sender by reply message and
then
>
> > > > delete
>
> > > > > the
>
> > > > > > electronic message and any attachments.
>
> > > > > >
>
> > > > >
>
> > > > >
>
> > >
> **********************************************************************
>
> > > > > This e-mail message and any attachments contain confidential
>
> > > > information
>
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
>
> > > > notified
>
> > > > > that disclosure, printing, copying, distribution, or the
taking
> of
>
> > > any
>
> > > > > action in reliance on the contents of this electronic
> information
>
> > is
>
> > > > > strictly prohibited. If you have received this e-mail message
in
>
> > > > error,
>
> > > > > please immediately notify the sender by reply message and then
>
> > > delete
>
> > > > the
>
> > > > > electronic message and any attachments.
>
> > > > >
>
> > > > >
>
> > >
> ---------------------------------------------------------------------
>
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
>
> > > > > For additional commands, e-mail:
>
> > log4j-user-help@logging.apache.org
>
> > > > >
>
> > > > >
>
> > > >
>
> > > >
>
> >
**********************************************************************
>
> > > > This e-mail message and any attachments contain confidential
>
> > > information
>
> > > > from Medco. If you are not the intended recipient, you are
hereby
>
> > > notified
>
> > > > that disclosure, printing, copying, distribution, or the taking
of
>
> > any
>
> > > > action in reliance on the contents of this electronic
information
> is
>
> > > > strictly prohibited. If you have received this e-mail message in
>
> > > error,
>
> > > > please immediately notify the sender by reply message and then
>
> > delete
>
> > > the
>
> > > > electronic message and any attachments.
>
> > > >
>
> > > >
>
> >
---------------------------------------------------------------------
>
> > > > To unsubscribe, e-mail:
log4j-user-unsubscribe@logging.apache.org
>
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
>
> > > >
>
> > > >
>
> > >
>
> > >
> **********************************************************************
>
> > > This e-mail message and any attachments contain confidential
>
> > information
>
> > > from Medco. If you are not the intended recipient, you are hereby
>
> > notified
>
> > > that disclosure, printing, copying, distribution, or the taking of
> any
>
> > > action in reliance on the contents of this electronic information
is
>
> > > strictly prohibited. If you have received this e-mail message in
>
> > error,
>
> > > please immediately notify the sender by reply message and then
> delete
>
> > the
>
> > > electronic message and any attachments.
>
> > >
>
> > >
> ---------------------------------------------------------------------
>
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>
> > > For additional commands, e-mail:
log4j-user-help@logging.apache.org
>
> > >
>
> > >
>
> >
>
> >
**********************************************************************
>
> > This e-mail message and any attachments contain confidential
> information
>
> > from Medco. If you are not the intended recipient, you are hereby
>
> > notified that disclosure, printing, copying, distribution, or the
> taking
>
> > of any action in reliance on the contents of this electronic
> information
>
> > is strictly prohibited. If you have received this e-mail message in
>
> > error, please immediately notify the sender by reply message and
then
>
> > delete the electronic message and any attachments.
>
> >
>
> >
---------------------------------------------------------------------
>
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> >
>
> >
**********************************************************************
>
> > This e-mail message and any attachments contain confidential
> information
>
> > from Medco. If you are not the intended recipient, you are hereby
> notified
>
> > that disclosure, printing, copying, distribution, or the taking of
any
>
> > action in reliance on the contents of this electronic information is
>
> > strictly prohibited. If you have received this e-mail message in
> error,
>
> > please immediately notify the sender by reply message and then
delete
> the
>
> > electronic message and any attachments.
>
> >
>
> >
---------------------------------------------------------------------
>
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> >
>
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
I checked  the contents of all jars (Other than chainsaw classpath) they
do not have log4j.dtd files..

Thank U,
VGSS

-----Original Message-----
From: Tim Watts [mailto:tim@cliftonfarm.org] 
Sent: Monday, September 19, 2011 3:49 PM
To: Log4J Users List
Subject: RE: log4j----Edit the event received

Are you sure there isn't another log4j config embedded in another jar?
Happens a lot (or used to in older distros).


On Mon, 2011-09-19 at 15:01 -0400, Konduru, Geetha wrote:
> No, regarding log4j I my classpath is same as chainsaw...
> 
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com] 
> Sent: Monday, September 19, 2011 2:01 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
> 
> Do you have an old DTD in your classpath?
> 
> The log4j.dtd was updated to support 'plugin' back in rev 532603, Apr
> 2007.
> 
> Scott
> 
> On Mon, Sep 19, 2011 at 10:55 AM, Konduru, Geetha
> <Ge...@medco.com>wrote:
> 
> > Yes I did that, if I do that than it complaints about tag
> > <reWritePolicy> and <plugin>.......
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Monday, September 19, 2011 1:39 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > Can you try adding these two lines to the top of your config?
> >
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> >
> >
> > Not sure why you're having this problem..
> >
> > Scott
> >
> > On Mon, Sep 19, 2011 at 10:19 AM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > >
> > >
> > > I used the config from following link exactly.... I still get
> > following
> > > exception
> > >
> > > log4j:WARN Continuable parsing error 1 and column 69
> > > log4j:WARN Document root element "log4j:configuration", must match
> > > DOCTYPE root "null".
> > > log4j:WARN Continuable parsing error 1 and column 69
> > > log4j:WARN Document is invalid: no grammar found.
> > >
> > >
> > >
> > > It looks like parsing is different in chainsaw application from my
> > > Application, my classpath is exactly same.....
> > >
> > >
> > > Weird!!!!!
> > >
> > > Thank U,
> > > VGSS
> > > -----Original Message-----
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > Sent: Monday, September 19, 2011 1:13 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j----Edit the event received
> > >
> > > I haven't seen that issue before...you should be able to use any
of
> > the
> > > configuration files in the test folder:
> > >
> > >
> >
>
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> > >
> >
>
c/test/resources/org/apache/log4j/rewrite/map.xml?revision=564831&view=m
> > > arkup
> > >
> > > On Mon, Sep 19, 2011 at 9:46 AM, Konduru, Geetha
> > > <Ge...@medco.com>wrote:
> > >
> > > > I used the same log4j.xml I used by chainsaw in my application
and
> > > > exactly same classpath , than I get following exception.
> > > >
> > > >
> > > > log4j:WARN Continuable parsing error 2 and column 82
> > > > log4j:WARN Document root element "log4j:configuration", must
match
> > > > DOCTYPE root "null".
> > > > log4j:WARN Continuable parsing error 2 and column 82
> > > > log4j:WARN Document is invalid: no grammar found.
> > > >
> > > >
> > > > Chainsaw config is.
> > > >
> > > >
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <log4j:configuration
> xmlns:log4j="http://jakarta.apache.org/log4j/"
> > > > debug="true">
> > > >    <plugin class="org.apache.log4j.net.SocketReceiver"
> > > > name="SocketReceiver-12346">
> > > >        <param name="active" value="true"/>
> > > >        <param name="advertiseViaMulticastDNS" value="false"/>
> > > >        <param name="class" value="class
> > > > org.apache.log4j.net.SocketReceiver"/>
> > > >        <param name="connectedSocketDetails" value="[]"/>
> > > >        <param name="name" value="SocketReceiver-12346"/>
> > > >        <param name="paused" value="false"/>
> > > >        <param name="port" value="12346"/>
> > > >        <param name="threshold" value="TRACE"/>
> > > >    </plugin>
> > > >   <appender name="F1" class="org.apache.log4j.FileAppender">
> > > >        <param name="file" value="c:/LogsDir/file.txt"/>
> > > >        <param name="append" value="false"/>
> > > >       <layout class="org.apache.log4j.PatternLayout">
> > > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > > p2:%X{p2} %m%n"/>
> > > >       </layout>
> > > >     </appender>
> > > >
> > > >
> > > >     <appender name="A1"
> > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > >       <appender-ref ref="F1"/>
> > > >       <rewritePolicy
> > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > >         <param name="properties"
> > value="p1=Hello,p2=World,x1=3.1415"/>
> > > >       </rewritePolicy>
> > > >     </appender>
> > > >
> > > >   <root>
> > > >      <level value="debug"/>
> > > >       <appender-ref ref="A1" />
> > > >    </root>
> > > >
> > > > </log4j:configuration>
> > > >
> > > > This makes me to think that is chainsaw code responsible for
> making
> > it
> > > > to work???????????????????????
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > Sent: Friday, September 16, 2011 4:03 PM
> > > > To: Log4J Users List
> > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > In theory then, you should be able to add the entire chainsaw
> > > classpath
> > > > to
> > > > your application classpath and see it work..yes?
> > > >
> > > > On Fri, Sep 16, 2011 at 12:58 PM, Konduru, Geetha
> > > > <Ge...@medco.com>wrote:
> > > >
> > > > > Just adding to last post , I am using log4j1.2.16 which is the
> one
> > > > used
> > > > > by chainsaw application too...
> > > > >
> > > > > -----Original Message-----
> > > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > > > Sent: Friday, September 16, 2011 3:26 PM
> > > > > To: Log4J Users List
> > > > > Subject: RE: log4j----Edit the event received
> > > > >
> > > > > Even for me it is working on chainsaw side.
> > > > > But if I have this on my application side where I define
> > > > SocketAppender
> > > > > , it is not working, I included components ,extras and
receivers
> > > jars.
> > > > >
> > > > >
> > > > > Thank U,
> > > > > VGSS
> > > > >
> > > > > -----Original Message-----
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > Sent: Friday, September 16, 2011 3:03 PM
> > > > > To: Log4J Users List
> > > > > Subject: Re: log4j----Edit the event received
> > > > >
> > > > > I just tried this and it worked fine....I modified the
Chainsaw
> > > config
> > > > > file
> > > > > I was using (anything received by Chainsaw can also be sent to
> > > > appenders
> > > > > defined in the same config)...configuration and example log
file
> > > > output
> > > > > below:
> > > > >
> > > > > Here's what I added to the Chainsaw config file:
> > > > >   <appender name="F1" class="org.apache.log4j.FileAppender">
> > > > >       <param name="file" value="c:/temp/file.txt"/>
> > > > >       <param name="append" value="false"/>
> > > > >       <layout class="org.apache.log4j.PatternLayout">
> > > > >         <param name="ConversionPattern" value="%p %c -
p1:%X{p1}
> > > > > p2:%X{p2}
> > > > > %m%n"/>
> > > > >       </layout>
> > > > >     </appender>
> > > > >
> > > > >
> > > > >     <appender name="A1"
> > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > > >       <appender-ref ref="F1"/>
> > > > >       <rewritePolicy
> > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > > >         <param name="properties"
> > > value="p1=Hello,p2=World,x1=3.1415"/>
> > > > >       </rewritePolicy>
> > > > >     </appender>
> > > > >
> > > > >   <root>
> > > > >      <level value="debug"/>
> > > > >       <appender-ref ref="A1" />
> > > > >    </root>
> > > > >
> > > > > And here is an example output line:
> > > > > DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE
> > RI-
> > > > > RI.DRI
> > > > >  FATAL ERROR WARNING INFO
> > > > >
> > > > >
> > > > > On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
> > > > > <Ge...@medco.com>wrote:
> > > > >
> > > > > > I tried this, its not working, following are warnings I get
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > log4j:WARN Continuable parsing error 48 and column 80
> > > > > >
> > > > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > > > >
> > > > > > log4j:WARN Continuable parsing error 52 and column 14
> > > > > >
> > > > > > log4j:WARN The content of element type "appender" must match
> > > > > >
> > > > >
> > > >
> > >
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > > > > ?,layout?,filter*,appender-ref*)".
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Adding an Appender to RewriteAppender is working fine, but
> > > assigning
> > > > > > rewritePolicy to a RewriteAppender is failing.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thank U,
> > > > > >
> > > > > > VGSS
> > > > > >
> > > > > >
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > > Sent: Friday, September 16, 2011 1:48 PM
> > > > > > To: Log4J Users List
> > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > >
> > > > > >
> > > > > > Here is an example from the tests in log4j:
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> > > > > >
> > > > >
> > > >
> > >
> >
>
c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> > > > > > ev=564831
> > > > > >
> > > > > >
> > > > > >
> > > > > >     <appender name="F1"
class="org.apache.log4j.FileAppender">
> > > > > >
> > > > > >       <param name="file" value="temp"/>
> > > > > >
> > > > > >       <param name="append" value="false"/>
> > > > > >
> > > > > >       <layout class="org.apache.log4j.PatternLayout">
> > > > > >
> > > > > >         <param name="ConversionPattern" value="%p %c -
> p1:%X{p1}
> > > > > > p2:%X{p2}
> > > > > >
> > > > > > %m%n"/>
> > > > > >
> > > > > >       </layout>
> > > > > >
> > > > > >     </appender>
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >     <appender name="A1"
> > > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > > > >
> > > > > >       <appender-ref ref="F1"/>
> > > > > >
> > > > > >       <rewritePolicy
> > > > > >
> > > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > > > >
> > > > > >         <param name="properties"
> > > > value="p1=Hello,p2=World,x1=3.1415"/>
> > > > > >
> > > > > >       </rewritePolicy>
> > > > > >
> > > > > >     </appender>
> > > > > >
> > > > > >
> > > > > >
> > > > > >     <root>
> > > > > >
> > > > > >       <level value ="debug" />
> > > > > >
> > > > > >       <appender-ref ref="A1" />
> > > > > >
> > > > > >     </root>
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
> > > > > >
> > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > > Would any one please give an example of xml configuration
> file
> > > > with
> > > > > >
> > > > > > > Rewrite Appender.
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > Thank U,
> > > > > >
> > > > > > > Vgss
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > >
> > > > > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > > > >
> > > > > > > Sent: Thursday, September 15, 2011 1:57 PM
> > > > > >
> > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > Subject: RE: log4j----Edit the event received
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > log4j: Trying to find [server2Rewritelog4j.xml] using
> context
> > > > > >
> > > > > > > classloader sun.misc.Launcher$AppClassLoader@601bb1.
> > > > > >
> > > > > > > log4j: Using URL
> > > > > >
> > > > > > >
> > > >
> [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> > > > > > for
> > > > > >
> > > > > > > automatic log4j configuration.
> > > > > >
> > > > > > > log4j: Preferred configurator class:
> > > > > >
> > > > > > > org.apache.log4j.xml.DOMConfigurator
> > > > > >
> > > > > > > log4j: System property is :null
> > > > > >
> > > > > > > log4j: Standard DocumentBuilderFactory search succeded.
> > > > > >
> > > > > > > log4j: DocumentBuilderFactory is:
> > > > > >
> > > > > > >
> > > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> > > > > >
> > > > > > > log4j:WARN Continuable parsing error 19 and column 97
> > > > > >
> > > > > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > > > >
> > > > > > > log4j:WARN Continuable parsing error 22 and column 12
> > > > > >
> > > > > > > log4j:WARN The content of element type "appender" must
match
> > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > > > >
> > > > > > > ?,layout?,filter*,appender-ref*)".
> > > > > >
> > > > > > > log4j: debug attribute= "null".
> > > > > >
> > > > > > > log4j: Ignoring debug attribute.
> > > > > >
> > > > > > > log4j: reset attribute= "false".
> > > > > >
> > > > > > > log4j: Threshold ="null".
> > > > > >
> > > > > > > log4j: Level value for root is  [debug].
> > > > > >
> > > > > > > log4j: root level set to DEBUG
> > > > > >
> > > > > > > log4j: Class name: [org.apache.log4j.ConsoleAppender]
> > > > > >
> > > > > > > log4j: Parsing layout of class:
> > "org.apache.log4j.PatternLayout"
> > > > > >
> > > > > > > log4j: Setting property [conversionPattern] to
[[%d{ISO8601}
> > %t
> > > > %c]
> > > > > >
> > > > > > > %m%n].
> > > > > >
> > > > > > > log4j: Adding appender named [CA] to category [root]
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > >
> > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > >
> > > > > > > Sent: Thursday, September 15, 2011 1:54 PM
> > > > > >
> > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > There is a DTD for core elements but alternate elements
can
> be
> > > > added
> > > > > >
> > > > > > > (like
> > > > > >
> > > > > > > rewritepolicy)...you won't find rewritepolicy in the DTD.
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > Can you add -Dlog4j.debug=true to your appender-side java
> > > command,
> > > > > and
> > > > > >
> > > > > > > paste
> > > > > >
> > > > > > > the output?
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > Thanks
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > Scott
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
> > > > > >
> > > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > > Where can I find XMLschema file for log4j XML
> configuration
> > > > > file????
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > Thank U,
> > > > > >
> > > > > > > > VGSS
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > -----Original Message-----
> > > > > >
> > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > >
> > > > > > > > Sent: Wednesday, September 14, 2011 4:51 PM
> > > > > >
> > > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > Missed the end param on the nested properties
param...not
> > sure
> > > > > about
> > > > > >
> > > > > > > > case of
> > > > > >
> > > > > > > > RewritePolicy node name..may be rewritePolicy.
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > <appender name="rewrite"
> > > > > >
> > > > > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > > > >
> > > > > > > >    <appender name="socket"
> > > > > >
> > > > > > > class="org.apache.log4j.net.SocketAppender">
> > > > > >
> > > > > > > >      <param name="Port" value="12346"/>
> > > > > >
> > > > > > > >      <param name="RemoteHost" value="localhost"/>
> > > > > >
> > > > > > > >      <param name="Application" value="app1"/>
> > > > > >
> > > > > > > >      <param name="ReconnectionDelay" value="60000"/>
> > > > > >
> > > > > > > >      <param name="Threshold" value="ALL"/>
> > > > > >
> > > > > > > >    </appender>
> > > > > >
> > > > > > > >    <RewritePolicy name="propertyPolicy"
> > > > > >
> > > > > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > > > >
> > > > > > > >        <param name="properties"
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> > > > > >
> > > > > > > > tyvalue2"/>
> > > > > >
> > > > > > > >    </RewritePolicy>
> > > > > >
> > > > > > > > </appender>
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> > > > > >
> > > > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > > Thank U...
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > -----Original Message-----
> > > > > >
> > > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > >
> > > > > > > > > Sent: Wednesday, September 14, 2011 4:31 PM
> > > > > >
> > > > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > remoteSourceInfo contains the connected port:
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > hostName = socket.getInetAddress().getHostName();
> > > > > >
> > > > > > > > > remoteInfo = hostName + ":" + socket.getPort();
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> > > > > >
> > > > > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > > yes, I got them
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > how are "hostname" and " log4j.remoteSourceInfo"
> > > different
> > > > > from
> > > > > >
> > > > > > > > each
> > > > > >
> > > > > > > > > > other....
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > thank U
> > > > > >
> > > > > > > > > > VGSS
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > >
> > > > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > >
> > > > > > > > > > Sent: Wednesday, September 14, 2011 4:15 PM
> > > > > >
> > > > > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > The SocketReceiver adds two properties to each
event:
> > > > > >
> > > > > > > > > > hostname
> > > > > >
> > > > > > > > > > log4j.remoteSourceInfo
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > With the developer snapshot of Chainsaw you should
see
> > > those
> > > > > as
> > > > > >
> > > > > > > > > > individual
> > > > > >
> > > > > > > > > > columns in the table.  If they aren't displayed by
> > default
> > > > you
> > > > > > can
> > > > > >
> > > > > > > > > > enable
> > > > > >
> > > > > > > > > > them via the tab preferences menu (select Columns).
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > Scott
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > > > > >
> > > > > > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > > Hi,
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >  What I am looking for is, every event received by
> > > > > >
> > > > > > > SocketAppender,
> > > > > >
> > > > > > > > > > even
> > > > > >
> > > > > > > > > > > before it send to remote machine, it must append
to
> > the
> > > > > >
> > > > > > > event(on
> > > > > >
> > > > > > > > > > which
> > > > > >
> > > > > > > > > > > log4j is running).
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >  Can any one please tell me a solution for this.
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > > Example: if application(running on machine
HOSTNAME)
> > > logs
> > > > > >
> > > > > > > message
> > > > > >
> > > > > > > > "I
> > > > > >
> > > > > > > > > > am
> > > > > >
> > > > > > > > > > > a Logging event", than SOCKET APPENDER must send
> > > following
> > > > > to
> > > > > >
> > > > > > > > REMOTE
> > > > > >
> > > > > > > > > > > machine(or SOCKET RECEIVER on Remote machine
should
> > > > receive
> > > > > >
> > > > > > > > > following
> > > > > >
> > > > > > > > > > as
> > > > > >
> > > > > > > > > > > log message).
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > > "HOSTNAME:I am a Logging event"
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > > Thank U,
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > > VGSS
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > > >
> > > > > > > > > > > This e-mail message and any attachments contain
> > > > confidential
> > > > > >
> > > > > > > > > > information
> > > > > >
> > > > > > > > > > > from Medco. If you are not the intended recipient,
> you
> > > are
> > > > > >
> > > > > > > hereby
> > > > > >
> > > > > > > > > > notified
> > > > > >
> > > > > > > > > > > that disclosure, printing, copying, distribution,
or
> > the
> > > > > > taking
> > > > > >
> > > > > > > of
> > > > > >
> > > > > > > > > any
> > > > > >
> > > > > > > > > > > action in reliance on the contents of this
> electronic
> > > > > >
> > > > > > > information
> > > > > >
> > > > > > > > is
> > > > > >
> > > > > > > > > > > strictly prohibited. If you have received this
> e-mail
> > > > > message
> > > > > > in
> > > > > >
> > > > > > > > > > error,
> > > > > >
> > > > > > > > > > > please immediately notify the sender by reply
> message
> > > and
> > > > > then
> > > > > >
> > > > > > > > > delete
> > > > > >
> > > > > > > > > > the
> > > > > >
> > > > > > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > >
> >
**********************************************************************
> > > > > >
> > > > > > > > > > This e-mail message and any attachments contain
> > > confidential
> > > > > >
> > > > > > > > > information
> > > > > >
> > > > > > > > > > from Medco. If you are not the intended recipient,
you
> > are
> > > > > > hereby
> > > > > >
> > > > > > > > > notified
> > > > > >
> > > > > > > > > > that disclosure, printing, copying, distribution, or
> the
> > > > > taking
> > > > > > of
> > > > > >
> > > > > > > > any
> > > > > >
> > > > > > > > > > action in reliance on the contents of this
electronic
> > > > > > information
> > > > > >
> > > > > > > is
> > > > > >
> > > > > > > > > > strictly prohibited. If you have received this
e-mail
> > > > message
> > > > > in
> > > > > >
> > > > > > > > > error,
> > > > > >
> > > > > > > > > > please immediately notify the sender by reply
message
> > and
> > > > then
> > > > > >
> > > > > > > > delete
> > > > > >
> > > > > > > > > the
> > > > > >
> > > > > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > >
> > > > > > > > > > To unsubscribe, e-mail:
> > > > > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > > > > For additional commands, e-mail:
> > > > > >
> > > > > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > > >
> > > > > > > > > This e-mail message and any attachments contain
> > confidential
> > > > > >
> > > > > > > > information
> > > > > >
> > > > > > > > > from Medco. If you are not the intended recipient, you
> are
> > > > > hereby
> > > > > >
> > > > > > > > notified
> > > > > >
> > > > > > > > > that disclosure, printing, copying, distribution, or
the
> > > > taking
> > > > > of
> > > > > >
> > > > > > > any
> > > > > >
> > > > > > > > > action in reliance on the contents of this electronic
> > > > > information
> > > > > > is
> > > > > >
> > > > > > > > > strictly prohibited. If you have received this e-mail
> > > message
> > > > in
> > > > > >
> > > > > > > > error,
> > > > > >
> > > > > > > > > please immediately notify the sender by reply message
> and
> > > then
> > > > > >
> > > > > > > delete
> > > > > >
> > > > > > > > the
> > > > > >
> > > > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > >
> > > > > > > > > To unsubscribe, e-mail:
> > > > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > > > For additional commands, e-mail:
> > > > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > >
> >
**********************************************************************
> > > > > >
> > > > > > > > This e-mail message and any attachments contain
> confidential
> > > > > >
> > > > > > > information
> > > > > >
> > > > > > > > from Medco. If you are not the intended recipient, you
are
> > > > hereby
> > > > > >
> > > > > > > notified
> > > > > >
> > > > > > > > that disclosure, printing, copying, distribution, or the
> > > taking
> > > > of
> > > > > > any
> > > > > >
> > > > > > > > action in reliance on the contents of this electronic
> > > > information
> > > > > is
> > > > > >
> > > > > > > > strictly prohibited. If you have received this e-mail
> > message
> > > in
> > > > > >
> > > > > > > error,
> > > > > >
> > > > > > > > please immediately notify the sender by reply message
and
> > then
> > > > > > delete
> > > > > >
> > > > > > > the
> > > > > >
> > > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > >
> > > > > > > > To unsubscribe, e-mail:
> > > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > > For additional commands, e-mail:
> > > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > > >
> > > > > > > This e-mail message and any attachments contain
confidential
> > > > > > information
> > > > > >
> > > > > > > from Medco. If you are not the intended recipient, you are
> > > hereby
> > > > > >
> > > > > > > notified that disclosure, printing, copying, distribution,
> or
> > > the
> > > > > > taking
> > > > > >
> > > > > > > of any action in reliance on the contents of this
electronic
> > > > > > information
> > > > > >
> > > > > > > is strictly prohibited. If you have received this e-mail
> > message
> > > > in
> > > > > >
> > > > > > > error, please immediately notify the sender by reply
message
> > and
> > > > > then
> > > > > >
> > > > > > > delete the electronic message and any attachments.
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > >
> > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > > >
> > > > > > > This e-mail message and any attachments contain
confidential
> > > > > > information
> > > > > >
> > > > > > > from Medco. If you are not the intended recipient, you are
> > > hereby
> > > > > > notified
> > > > > >
> > > > > > > that disclosure, printing, copying, distribution, or the
> > taking
> > > of
> > > > > any
> > > > > >
> > > > > > > action in reliance on the contents of this electronic
> > > information
> > > > is
> > > > > >
> > > > > > > strictly prohibited. If you have received this e-mail
> message
> > in
> > > > > > error,
> > > > > >
> > > > > > > please immediately notify the sender by reply message and
> then
> > > > > delete
> > > > > > the
> > > > > >
> > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > >
> > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > >
> >
**********************************************************************
> > > > > > This e-mail message and any attachments contain confidential
> > > > > information
> > > > > > from Medco. If you are not the intended recipient, you are
> > hereby
> > > > > notified
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
> > of
> > > > any
> > > > > > action in reliance on the contents of this electronic
> > information
> > > is
> > > > > > strictly prohibited. If you have received this e-mail
message
> in
> > > > > error,
> > > > > > please immediately notify the sender by reply message and
then
> > > > delete
> > > > > the
> > > > > > electronic message and any attachments.
> > > > > >
> > > > >
> > > > >
> > >
> **********************************************************************
> > > > > This e-mail message and any attachments contain confidential
> > > > information
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > > > > notified that disclosure, printing, copying, distribution, or
> the
> > > > taking
> > > > > of any action in reliance on the contents of this electronic
> > > > information
> > > > > is strictly prohibited. If you have received this e-mail
message
> > in
> > > > > error, please immediately notify the sender by reply message
and
> > > then
> > > > > delete the electronic message and any attachments.
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > > >
> > > > >
> > >
> **********************************************************************
> > > > > This e-mail message and any attachments contain confidential
> > > > information
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > > > notified
> > > > > that disclosure, printing, copying, distribution, or the
taking
> of
> > > any
> > > > > action in reliance on the contents of this electronic
> information
> > is
> > > > > strictly prohibited. If you have received this e-mail message
in
> > > > error,
> > > > > please immediately notify the sender by reply message and then
> > > delete
> > > > the
> > > > > electronic message and any attachments.
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > > >
> > > > >
> > > >
> > > >
> >
**********************************************************************
> > > > This e-mail message and any attachments contain confidential
> > > information
> > > > from Medco. If you are not the intended recipient, you are
hereby
> > > notified
> > > > that disclosure, printing, copying, distribution, or the taking
of
> > any
> > > > action in reliance on the contents of this electronic
information
> is
> > > > strictly prohibited. If you have received this e-mail message in
> > > error,
> > > > please immediately notify the sender by reply message and then
> > delete
> > > the
> > > > electronic message and any attachments.
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > > >
> > > >
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information
is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail:
log4j-user-help@logging.apache.org
> > >
> > >
> >
> >
**********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of
any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then
delete
> the
> > electronic message and any attachments.
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
> 
> **********************************************************************
> This e-mail message and any attachments contain confidential
information from Medco. If you are not the intended recipient, you are
hereby notified that disclosure, printing, copying, distribution, or the
taking of any action in reliance on the contents of this electronic
information is strictly prohibited. If you have received this e-mail
message in error, please immediately notify the sender by reply message
and then delete the electronic message and any attachments.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 



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

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
I tried to edit the event in a small Hello World program , still I see
the issue  as following......

log4j:WARN Continuable parsing error 14 and column 79
log4j:WARN Element type "rewritePolicy" must be declared.
log4j:WARN Continuable parsing error 17 and column 15
log4j:WARN The content of element type "appender" must match
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
?,layout?,filter*,appender-ref*)".
log4j:WARN Unrecognized element plugin

It confirms that I am not using any old log4j.dtd.


Now my classpath is exactly same as chainsaw path.


Thank U,
VGSS

-----Original Message-----
From: Tim Watts [mailto:tim@cliftonfarm.org] 
Sent: Monday, September 19, 2011 3:49 PM
To: Log4J Users List
Subject: RE: log4j----Edit the event received

Are you sure there isn't another log4j config embedded in another jar?
Happens a lot (or used to in older distros).


On Mon, 2011-09-19 at 15:01 -0400, Konduru, Geetha wrote:
> No, regarding log4j I my classpath is same as chainsaw...
> 
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com] 
> Sent: Monday, September 19, 2011 2:01 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
> 
> Do you have an old DTD in your classpath?
> 
> The log4j.dtd was updated to support 'plugin' back in rev 532603, Apr
> 2007.
> 
> Scott
> 
> On Mon, Sep 19, 2011 at 10:55 AM, Konduru, Geetha
> <Ge...@medco.com>wrote:
> 
> > Yes I did that, if I do that than it complaints about tag
> > <reWritePolicy> and <plugin>.......
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Monday, September 19, 2011 1:39 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > Can you try adding these two lines to the top of your config?
> >
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> >
> >
> > Not sure why you're having this problem..
> >
> > Scott
> >
> > On Mon, Sep 19, 2011 at 10:19 AM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > >
> > >
> > > I used the config from following link exactly.... I still get
> > following
> > > exception
> > >
> > > log4j:WARN Continuable parsing error 1 and column 69
> > > log4j:WARN Document root element "log4j:configuration", must match
> > > DOCTYPE root "null".
> > > log4j:WARN Continuable parsing error 1 and column 69
> > > log4j:WARN Document is invalid: no grammar found.
> > >
> > >
> > >
> > > It looks like parsing is different in chainsaw application from my
> > > Application, my classpath is exactly same.....
> > >
> > >
> > > Weird!!!!!
> > >
> > > Thank U,
> > > VGSS
> > > -----Original Message-----
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > Sent: Monday, September 19, 2011 1:13 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j----Edit the event received
> > >
> > > I haven't seen that issue before...you should be able to use any
of
> > the
> > > configuration files in the test folder:
> > >
> > >
> >
>
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> > >
> >
>
c/test/resources/org/apache/log4j/rewrite/map.xml?revision=564831&view=m
> > > arkup
> > >
> > > On Mon, Sep 19, 2011 at 9:46 AM, Konduru, Geetha
> > > <Ge...@medco.com>wrote:
> > >
> > > > I used the same log4j.xml I used by chainsaw in my application
and
> > > > exactly same classpath , than I get following exception.
> > > >
> > > >
> > > > log4j:WARN Continuable parsing error 2 and column 82
> > > > log4j:WARN Document root element "log4j:configuration", must
match
> > > > DOCTYPE root "null".
> > > > log4j:WARN Continuable parsing error 2 and column 82
> > > > log4j:WARN Document is invalid: no grammar found.
> > > >
> > > >
> > > > Chainsaw config is.
> > > >
> > > >
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <log4j:configuration
> xmlns:log4j="http://jakarta.apache.org/log4j/"
> > > > debug="true">
> > > >    <plugin class="org.apache.log4j.net.SocketReceiver"
> > > > name="SocketReceiver-12346">
> > > >        <param name="active" value="true"/>
> > > >        <param name="advertiseViaMulticastDNS" value="false"/>
> > > >        <param name="class" value="class
> > > > org.apache.log4j.net.SocketReceiver"/>
> > > >        <param name="connectedSocketDetails" value="[]"/>
> > > >        <param name="name" value="SocketReceiver-12346"/>
> > > >        <param name="paused" value="false"/>
> > > >        <param name="port" value="12346"/>
> > > >        <param name="threshold" value="TRACE"/>
> > > >    </plugin>
> > > >   <appender name="F1" class="org.apache.log4j.FileAppender">
> > > >        <param name="file" value="c:/LogsDir/file.txt"/>
> > > >        <param name="append" value="false"/>
> > > >       <layout class="org.apache.log4j.PatternLayout">
> > > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > > p2:%X{p2} %m%n"/>
> > > >       </layout>
> > > >     </appender>
> > > >
> > > >
> > > >     <appender name="A1"
> > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > >       <appender-ref ref="F1"/>
> > > >       <rewritePolicy
> > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > >         <param name="properties"
> > value="p1=Hello,p2=World,x1=3.1415"/>
> > > >       </rewritePolicy>
> > > >     </appender>
> > > >
> > > >   <root>
> > > >      <level value="debug"/>
> > > >       <appender-ref ref="A1" />
> > > >    </root>
> > > >
> > > > </log4j:configuration>
> > > >
> > > > This makes me to think that is chainsaw code responsible for
> making
> > it
> > > > to work???????????????????????
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > Sent: Friday, September 16, 2011 4:03 PM
> > > > To: Log4J Users List
> > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > In theory then, you should be able to add the entire chainsaw
> > > classpath
> > > > to
> > > > your application classpath and see it work..yes?
> > > >
> > > > On Fri, Sep 16, 2011 at 12:58 PM, Konduru, Geetha
> > > > <Ge...@medco.com>wrote:
> > > >
> > > > > Just adding to last post , I am using log4j1.2.16 which is the
> one
> > > > used
> > > > > by chainsaw application too...
> > > > >
> > > > > -----Original Message-----
> > > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > > > Sent: Friday, September 16, 2011 3:26 PM
> > > > > To: Log4J Users List
> > > > > Subject: RE: log4j----Edit the event received
> > > > >
> > > > > Even for me it is working on chainsaw side.
> > > > > But if I have this on my application side where I define
> > > > SocketAppender
> > > > > , it is not working, I included components ,extras and
receivers
> > > jars.
> > > > >
> > > > >
> > > > > Thank U,
> > > > > VGSS
> > > > >
> > > > > -----Original Message-----
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > Sent: Friday, September 16, 2011 3:03 PM
> > > > > To: Log4J Users List
> > > > > Subject: Re: log4j----Edit the event received
> > > > >
> > > > > I just tried this and it worked fine....I modified the
Chainsaw
> > > config
> > > > > file
> > > > > I was using (anything received by Chainsaw can also be sent to
> > > > appenders
> > > > > defined in the same config)...configuration and example log
file
> > > > output
> > > > > below:
> > > > >
> > > > > Here's what I added to the Chainsaw config file:
> > > > >   <appender name="F1" class="org.apache.log4j.FileAppender">
> > > > >       <param name="file" value="c:/temp/file.txt"/>
> > > > >       <param name="append" value="false"/>
> > > > >       <layout class="org.apache.log4j.PatternLayout">
> > > > >         <param name="ConversionPattern" value="%p %c -
p1:%X{p1}
> > > > > p2:%X{p2}
> > > > > %m%n"/>
> > > > >       </layout>
> > > > >     </appender>
> > > > >
> > > > >
> > > > >     <appender name="A1"
> > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > > >       <appender-ref ref="F1"/>
> > > > >       <rewritePolicy
> > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > > >         <param name="properties"
> > > value="p1=Hello,p2=World,x1=3.1415"/>
> > > > >       </rewritePolicy>
> > > > >     </appender>
> > > > >
> > > > >   <root>
> > > > >      <level value="debug"/>
> > > > >       <appender-ref ref="A1" />
> > > > >    </root>
> > > > >
> > > > > And here is an example output line:
> > > > > DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE
> > RI-
> > > > > RI.DRI
> > > > >  FATAL ERROR WARNING INFO
> > > > >
> > > > >
> > > > > On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
> > > > > <Ge...@medco.com>wrote:
> > > > >
> > > > > > I tried this, its not working, following are warnings I get
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > log4j:WARN Continuable parsing error 48 and column 80
> > > > > >
> > > > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > > > >
> > > > > > log4j:WARN Continuable parsing error 52 and column 14
> > > > > >
> > > > > > log4j:WARN The content of element type "appender" must match
> > > > > >
> > > > >
> > > >
> > >
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > > > > ?,layout?,filter*,appender-ref*)".
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Adding an Appender to RewriteAppender is working fine, but
> > > assigning
> > > > > > rewritePolicy to a RewriteAppender is failing.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thank U,
> > > > > >
> > > > > > VGSS
> > > > > >
> > > > > >
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > > Sent: Friday, September 16, 2011 1:48 PM
> > > > > > To: Log4J Users List
> > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > >
> > > > > >
> > > > > > Here is an example from the tests in log4j:
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> > > > > >
> > > > >
> > > >
> > >
> >
>
c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> > > > > > ev=564831
> > > > > >
> > > > > >
> > > > > >
> > > > > >     <appender name="F1"
class="org.apache.log4j.FileAppender">
> > > > > >
> > > > > >       <param name="file" value="temp"/>
> > > > > >
> > > > > >       <param name="append" value="false"/>
> > > > > >
> > > > > >       <layout class="org.apache.log4j.PatternLayout">
> > > > > >
> > > > > >         <param name="ConversionPattern" value="%p %c -
> p1:%X{p1}
> > > > > > p2:%X{p2}
> > > > > >
> > > > > > %m%n"/>
> > > > > >
> > > > > >       </layout>
> > > > > >
> > > > > >     </appender>
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >     <appender name="A1"
> > > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > > > >
> > > > > >       <appender-ref ref="F1"/>
> > > > > >
> > > > > >       <rewritePolicy
> > > > > >
> > > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > > > >
> > > > > >         <param name="properties"
> > > > value="p1=Hello,p2=World,x1=3.1415"/>
> > > > > >
> > > > > >       </rewritePolicy>
> > > > > >
> > > > > >     </appender>
> > > > > >
> > > > > >
> > > > > >
> > > > > >     <root>
> > > > > >
> > > > > >       <level value ="debug" />
> > > > > >
> > > > > >       <appender-ref ref="A1" />
> > > > > >
> > > > > >     </root>
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
> > > > > >
> > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > > Would any one please give an example of xml configuration
> file
> > > > with
> > > > > >
> > > > > > > Rewrite Appender.
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > Thank U,
> > > > > >
> > > > > > > Vgss
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > >
> > > > > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > > > >
> > > > > > > Sent: Thursday, September 15, 2011 1:57 PM
> > > > > >
> > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > Subject: RE: log4j----Edit the event received
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > log4j: Trying to find [server2Rewritelog4j.xml] using
> context
> > > > > >
> > > > > > > classloader sun.misc.Launcher$AppClassLoader@601bb1.
> > > > > >
> > > > > > > log4j: Using URL
> > > > > >
> > > > > > >
> > > >
> [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> > > > > > for
> > > > > >
> > > > > > > automatic log4j configuration.
> > > > > >
> > > > > > > log4j: Preferred configurator class:
> > > > > >
> > > > > > > org.apache.log4j.xml.DOMConfigurator
> > > > > >
> > > > > > > log4j: System property is :null
> > > > > >
> > > > > > > log4j: Standard DocumentBuilderFactory search succeded.
> > > > > >
> > > > > > > log4j: DocumentBuilderFactory is:
> > > > > >
> > > > > > >
> > > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> > > > > >
> > > > > > > log4j:WARN Continuable parsing error 19 and column 97
> > > > > >
> > > > > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > > > >
> > > > > > > log4j:WARN Continuable parsing error 22 and column 12
> > > > > >
> > > > > > > log4j:WARN The content of element type "appender" must
match
> > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > > > >
> > > > > > > ?,layout?,filter*,appender-ref*)".
> > > > > >
> > > > > > > log4j: debug attribute= "null".
> > > > > >
> > > > > > > log4j: Ignoring debug attribute.
> > > > > >
> > > > > > > log4j: reset attribute= "false".
> > > > > >
> > > > > > > log4j: Threshold ="null".
> > > > > >
> > > > > > > log4j: Level value for root is  [debug].
> > > > > >
> > > > > > > log4j: root level set to DEBUG
> > > > > >
> > > > > > > log4j: Class name: [org.apache.log4j.ConsoleAppender]
> > > > > >
> > > > > > > log4j: Parsing layout of class:
> > "org.apache.log4j.PatternLayout"
> > > > > >
> > > > > > > log4j: Setting property [conversionPattern] to
[[%d{ISO8601}
> > %t
> > > > %c]
> > > > > >
> > > > > > > %m%n].
> > > > > >
> > > > > > > log4j: Adding appender named [CA] to category [root]
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > >
> > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > >
> > > > > > > Sent: Thursday, September 15, 2011 1:54 PM
> > > > > >
> > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > There is a DTD for core elements but alternate elements
can
> be
> > > > added
> > > > > >
> > > > > > > (like
> > > > > >
> > > > > > > rewritepolicy)...you won't find rewritepolicy in the DTD.
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > Can you add -Dlog4j.debug=true to your appender-side java
> > > command,
> > > > > and
> > > > > >
> > > > > > > paste
> > > > > >
> > > > > > > the output?
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > Thanks
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > Scott
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
> > > > > >
> > > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > > Where can I find XMLschema file for log4j XML
> configuration
> > > > > file????
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > Thank U,
> > > > > >
> > > > > > > > VGSS
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > -----Original Message-----
> > > > > >
> > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > >
> > > > > > > > Sent: Wednesday, September 14, 2011 4:51 PM
> > > > > >
> > > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > Missed the end param on the nested properties
param...not
> > sure
> > > > > about
> > > > > >
> > > > > > > > case of
> > > > > >
> > > > > > > > RewritePolicy node name..may be rewritePolicy.
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > <appender name="rewrite"
> > > > > >
> > > > > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > > > >
> > > > > > > >    <appender name="socket"
> > > > > >
> > > > > > > class="org.apache.log4j.net.SocketAppender">
> > > > > >
> > > > > > > >      <param name="Port" value="12346"/>
> > > > > >
> > > > > > > >      <param name="RemoteHost" value="localhost"/>
> > > > > >
> > > > > > > >      <param name="Application" value="app1"/>
> > > > > >
> > > > > > > >      <param name="ReconnectionDelay" value="60000"/>
> > > > > >
> > > > > > > >      <param name="Threshold" value="ALL"/>
> > > > > >
> > > > > > > >    </appender>
> > > > > >
> > > > > > > >    <RewritePolicy name="propertyPolicy"
> > > > > >
> > > > > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > > > >
> > > > > > > >        <param name="properties"
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> > > > > >
> > > > > > > > tyvalue2"/>
> > > > > >
> > > > > > > >    </RewritePolicy>
> > > > > >
> > > > > > > > </appender>
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> > > > > >
> > > > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > > Thank U...
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > -----Original Message-----
> > > > > >
> > > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > >
> > > > > > > > > Sent: Wednesday, September 14, 2011 4:31 PM
> > > > > >
> > > > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > remoteSourceInfo contains the connected port:
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > hostName = socket.getInetAddress().getHostName();
> > > > > >
> > > > > > > > > remoteInfo = hostName + ":" + socket.getPort();
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> > > > > >
> > > > > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > > yes, I got them
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > how are "hostname" and " log4j.remoteSourceInfo"
> > > different
> > > > > from
> > > > > >
> > > > > > > > each
> > > > > >
> > > > > > > > > > other....
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > thank U
> > > > > >
> > > > > > > > > > VGSS
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > >
> > > > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > >
> > > > > > > > > > Sent: Wednesday, September 14, 2011 4:15 PM
> > > > > >
> > > > > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > The SocketReceiver adds two properties to each
event:
> > > > > >
> > > > > > > > > > hostname
> > > > > >
> > > > > > > > > > log4j.remoteSourceInfo
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > With the developer snapshot of Chainsaw you should
see
> > > those
> > > > > as
> > > > > >
> > > > > > > > > > individual
> > > > > >
> > > > > > > > > > columns in the table.  If they aren't displayed by
> > default
> > > > you
> > > > > > can
> > > > > >
> > > > > > > > > > enable
> > > > > >
> > > > > > > > > > them via the tab preferences menu (select Columns).
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > Scott
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > > > > >
> > > > > > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > > Hi,
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >  What I am looking for is, every event received by
> > > > > >
> > > > > > > SocketAppender,
> > > > > >
> > > > > > > > > > even
> > > > > >
> > > > > > > > > > > before it send to remote machine, it must append
to
> > the
> > > > > >
> > > > > > > event(on
> > > > > >
> > > > > > > > > > which
> > > > > >
> > > > > > > > > > > log4j is running).
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >  Can any one please tell me a solution for this.
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > > Example: if application(running on machine
HOSTNAME)
> > > logs
> > > > > >
> > > > > > > message
> > > > > >
> > > > > > > > "I
> > > > > >
> > > > > > > > > > am
> > > > > >
> > > > > > > > > > > a Logging event", than SOCKET APPENDER must send
> > > following
> > > > > to
> > > > > >
> > > > > > > > REMOTE
> > > > > >
> > > > > > > > > > > machine(or SOCKET RECEIVER on Remote machine
should
> > > > receive
> > > > > >
> > > > > > > > > following
> > > > > >
> > > > > > > > > > as
> > > > > >
> > > > > > > > > > > log message).
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > > "HOSTNAME:I am a Logging event"
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > > Thank U,
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > > VGSS
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > > >
> > > > > > > > > > > This e-mail message and any attachments contain
> > > > confidential
> > > > > >
> > > > > > > > > > information
> > > > > >
> > > > > > > > > > > from Medco. If you are not the intended recipient,
> you
> > > are
> > > > > >
> > > > > > > hereby
> > > > > >
> > > > > > > > > > notified
> > > > > >
> > > > > > > > > > > that disclosure, printing, copying, distribution,
or
> > the
> > > > > > taking
> > > > > >
> > > > > > > of
> > > > > >
> > > > > > > > > any
> > > > > >
> > > > > > > > > > > action in reliance on the contents of this
> electronic
> > > > > >
> > > > > > > information
> > > > > >
> > > > > > > > is
> > > > > >
> > > > > > > > > > > strictly prohibited. If you have received this
> e-mail
> > > > > message
> > > > > > in
> > > > > >
> > > > > > > > > > error,
> > > > > >
> > > > > > > > > > > please immediately notify the sender by reply
> message
> > > and
> > > > > then
> > > > > >
> > > > > > > > > delete
> > > > > >
> > > > > > > > > > the
> > > > > >
> > > > > > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > >
> >
**********************************************************************
> > > > > >
> > > > > > > > > > This e-mail message and any attachments contain
> > > confidential
> > > > > >
> > > > > > > > > information
> > > > > >
> > > > > > > > > > from Medco. If you are not the intended recipient,
you
> > are
> > > > > > hereby
> > > > > >
> > > > > > > > > notified
> > > > > >
> > > > > > > > > > that disclosure, printing, copying, distribution, or
> the
> > > > > taking
> > > > > > of
> > > > > >
> > > > > > > > any
> > > > > >
> > > > > > > > > > action in reliance on the contents of this
electronic
> > > > > > information
> > > > > >
> > > > > > > is
> > > > > >
> > > > > > > > > > strictly prohibited. If you have received this
e-mail
> > > > message
> > > > > in
> > > > > >
> > > > > > > > > error,
> > > > > >
> > > > > > > > > > please immediately notify the sender by reply
message
> > and
> > > > then
> > > > > >
> > > > > > > > delete
> > > > > >
> > > > > > > > > the
> > > > > >
> > > > > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > >
> > > > > > > > > > To unsubscribe, e-mail:
> > > > > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > > > > For additional commands, e-mail:
> > > > > >
> > > > > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > > >
> > > > > > > > > This e-mail message and any attachments contain
> > confidential
> > > > > >
> > > > > > > > information
> > > > > >
> > > > > > > > > from Medco. If you are not the intended recipient, you
> are
> > > > > hereby
> > > > > >
> > > > > > > > notified
> > > > > >
> > > > > > > > > that disclosure, printing, copying, distribution, or
the
> > > > taking
> > > > > of
> > > > > >
> > > > > > > any
> > > > > >
> > > > > > > > > action in reliance on the contents of this electronic
> > > > > information
> > > > > > is
> > > > > >
> > > > > > > > > strictly prohibited. If you have received this e-mail
> > > message
> > > > in
> > > > > >
> > > > > > > > error,
> > > > > >
> > > > > > > > > please immediately notify the sender by reply message
> and
> > > then
> > > > > >
> > > > > > > delete
> > > > > >
> > > > > > > > the
> > > > > >
> > > > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > >
> > > > > > > > > To unsubscribe, e-mail:
> > > > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > > > For additional commands, e-mail:
> > > > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > >
> >
**********************************************************************
> > > > > >
> > > > > > > > This e-mail message and any attachments contain
> confidential
> > > > > >
> > > > > > > information
> > > > > >
> > > > > > > > from Medco. If you are not the intended recipient, you
are
> > > > hereby
> > > > > >
> > > > > > > notified
> > > > > >
> > > > > > > > that disclosure, printing, copying, distribution, or the
> > > taking
> > > > of
> > > > > > any
> > > > > >
> > > > > > > > action in reliance on the contents of this electronic
> > > > information
> > > > > is
> > > > > >
> > > > > > > > strictly prohibited. If you have received this e-mail
> > message
> > > in
> > > > > >
> > > > > > > error,
> > > > > >
> > > > > > > > please immediately notify the sender by reply message
and
> > then
> > > > > > delete
> > > > > >
> > > > > > > the
> > > > > >
> > > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > >
> > > > > > > > To unsubscribe, e-mail:
> > > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > > For additional commands, e-mail:
> > > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > > >
> > > > > > > This e-mail message and any attachments contain
confidential
> > > > > > information
> > > > > >
> > > > > > > from Medco. If you are not the intended recipient, you are
> > > hereby
> > > > > >
> > > > > > > notified that disclosure, printing, copying, distribution,
> or
> > > the
> > > > > > taking
> > > > > >
> > > > > > > of any action in reliance on the contents of this
electronic
> > > > > > information
> > > > > >
> > > > > > > is strictly prohibited. If you have received this e-mail
> > message
> > > > in
> > > > > >
> > > > > > > error, please immediately notify the sender by reply
message
> > and
> > > > > then
> > > > > >
> > > > > > > delete the electronic message and any attachments.
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > >
> > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > > >
> > > > > > > This e-mail message and any attachments contain
confidential
> > > > > > information
> > > > > >
> > > > > > > from Medco. If you are not the intended recipient, you are
> > > hereby
> > > > > > notified
> > > > > >
> > > > > > > that disclosure, printing, copying, distribution, or the
> > taking
> > > of
> > > > > any
> > > > > >
> > > > > > > action in reliance on the contents of this electronic
> > > information
> > > > is
> > > > > >
> > > > > > > strictly prohibited. If you have received this e-mail
> message
> > in
> > > > > > error,
> > > > > >
> > > > > > > please immediately notify the sender by reply message and
> then
> > > > > delete
> > > > > > the
> > > > > >
> > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > >
> > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > >
> >
**********************************************************************
> > > > > > This e-mail message and any attachments contain confidential
> > > > > information
> > > > > > from Medco. If you are not the intended recipient, you are
> > hereby
> > > > > notified
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
> > of
> > > > any
> > > > > > action in reliance on the contents of this electronic
> > information
> > > is
> > > > > > strictly prohibited. If you have received this e-mail
message
> in
> > > > > error,
> > > > > > please immediately notify the sender by reply message and
then
> > > > delete
> > > > > the
> > > > > > electronic message and any attachments.
> > > > > >
> > > > >
> > > > >
> > >
> **********************************************************************
> > > > > This e-mail message and any attachments contain confidential
> > > > information
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > > > > notified that disclosure, printing, copying, distribution, or
> the
> > > > taking
> > > > > of any action in reliance on the contents of this electronic
> > > > information
> > > > > is strictly prohibited. If you have received this e-mail
message
> > in
> > > > > error, please immediately notify the sender by reply message
and
> > > then
> > > > > delete the electronic message and any attachments.
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > > >
> > > > >
> > >
> **********************************************************************
> > > > > This e-mail message and any attachments contain confidential
> > > > information
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > > > notified
> > > > > that disclosure, printing, copying, distribution, or the
taking
> of
> > > any
> > > > > action in reliance on the contents of this electronic
> information
> > is
> > > > > strictly prohibited. If you have received this e-mail message
in
> > > > error,
> > > > > please immediately notify the sender by reply message and then
> > > delete
> > > > the
> > > > > electronic message and any attachments.
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > > >
> > > > >
> > > >
> > > >
> >
**********************************************************************
> > > > This e-mail message and any attachments contain confidential
> > > information
> > > > from Medco. If you are not the intended recipient, you are
hereby
> > > notified
> > > > that disclosure, printing, copying, distribution, or the taking
of
> > any
> > > > action in reliance on the contents of this electronic
information
> is
> > > > strictly prohibited. If you have received this e-mail message in
> > > error,
> > > > please immediately notify the sender by reply message and then
> > delete
> > > the
> > > > electronic message and any attachments.
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > > >
> > > >
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information
is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail:
log4j-user-help@logging.apache.org
> > >
> > >
> >
> >
**********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of
any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then
delete
> the
> > electronic message and any attachments.
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
> 
> **********************************************************************
> This e-mail message and any attachments contain confidential
information from Medco. If you are not the intended recipient, you are
hereby notified that disclosure, printing, copying, distribution, or the
taking of any action in reliance on the contents of this electronic
information is strictly prohibited. If you have received this e-mail
message in error, please immediately notify the sender by reply message
and then delete the electronic message and any attachments.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 



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

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


RE: log4j----Edit the event received

Posted by Tim Watts <ti...@cliftonfarm.org>.
Are you sure there isn't another log4j config embedded in another jar?
Happens a lot (or used to in older distros).


On Mon, 2011-09-19 at 15:01 -0400, Konduru, Geetha wrote:
> No, regarding log4j I my classpath is same as chainsaw...
> 
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com] 
> Sent: Monday, September 19, 2011 2:01 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
> 
> Do you have an old DTD in your classpath?
> 
> The log4j.dtd was updated to support 'plugin' back in rev 532603, Apr
> 2007.
> 
> Scott
> 
> On Mon, Sep 19, 2011 at 10:55 AM, Konduru, Geetha
> <Ge...@medco.com>wrote:
> 
> > Yes I did that, if I do that than it complaints about tag
> > <reWritePolicy> and <plugin>.......
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Monday, September 19, 2011 1:39 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > Can you try adding these two lines to the top of your config?
> >
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> >
> >
> > Not sure why you're having this problem..
> >
> > Scott
> >
> > On Mon, Sep 19, 2011 at 10:19 AM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > >
> > >
> > > I used the config from following link exactly.... I still get
> > following
> > > exception
> > >
> > > log4j:WARN Continuable parsing error 1 and column 69
> > > log4j:WARN Document root element "log4j:configuration", must match
> > > DOCTYPE root "null".
> > > log4j:WARN Continuable parsing error 1 and column 69
> > > log4j:WARN Document is invalid: no grammar found.
> > >
> > >
> > >
> > > It looks like parsing is different in chainsaw application from my
> > > Application, my classpath is exactly same.....
> > >
> > >
> > > Weird!!!!!
> > >
> > > Thank U,
> > > VGSS
> > > -----Original Message-----
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > Sent: Monday, September 19, 2011 1:13 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j----Edit the event received
> > >
> > > I haven't seen that issue before...you should be able to use any of
> > the
> > > configuration files in the test folder:
> > >
> > >
> >
> http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> > >
> >
> c/test/resources/org/apache/log4j/rewrite/map.xml?revision=564831&view=m
> > > arkup
> > >
> > > On Mon, Sep 19, 2011 at 9:46 AM, Konduru, Geetha
> > > <Ge...@medco.com>wrote:
> > >
> > > > I used the same log4j.xml I used by chainsaw in my application and
> > > > exactly same classpath , than I get following exception.
> > > >
> > > >
> > > > log4j:WARN Continuable parsing error 2 and column 82
> > > > log4j:WARN Document root element "log4j:configuration", must match
> > > > DOCTYPE root "null".
> > > > log4j:WARN Continuable parsing error 2 and column 82
> > > > log4j:WARN Document is invalid: no grammar found.
> > > >
> > > >
> > > > Chainsaw config is.
> > > >
> > > >
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <log4j:configuration
> xmlns:log4j="http://jakarta.apache.org/log4j/"
> > > > debug="true">
> > > >    <plugin class="org.apache.log4j.net.SocketReceiver"
> > > > name="SocketReceiver-12346">
> > > >        <param name="active" value="true"/>
> > > >        <param name="advertiseViaMulticastDNS" value="false"/>
> > > >        <param name="class" value="class
> > > > org.apache.log4j.net.SocketReceiver"/>
> > > >        <param name="connectedSocketDetails" value="[]"/>
> > > >        <param name="name" value="SocketReceiver-12346"/>
> > > >        <param name="paused" value="false"/>
> > > >        <param name="port" value="12346"/>
> > > >        <param name="threshold" value="TRACE"/>
> > > >    </plugin>
> > > >   <appender name="F1" class="org.apache.log4j.FileAppender">
> > > >        <param name="file" value="c:/LogsDir/file.txt"/>
> > > >        <param name="append" value="false"/>
> > > >       <layout class="org.apache.log4j.PatternLayout">
> > > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > > p2:%X{p2} %m%n"/>
> > > >       </layout>
> > > >     </appender>
> > > >
> > > >
> > > >     <appender name="A1"
> > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > >       <appender-ref ref="F1"/>
> > > >       <rewritePolicy
> > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > >         <param name="properties"
> > value="p1=Hello,p2=World,x1=3.1415"/>
> > > >       </rewritePolicy>
> > > >     </appender>
> > > >
> > > >   <root>
> > > >      <level value="debug"/>
> > > >       <appender-ref ref="A1" />
> > > >    </root>
> > > >
> > > > </log4j:configuration>
> > > >
> > > > This makes me to think that is chainsaw code responsible for
> making
> > it
> > > > to work???????????????????????
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > Sent: Friday, September 16, 2011 4:03 PM
> > > > To: Log4J Users List
> > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > In theory then, you should be able to add the entire chainsaw
> > > classpath
> > > > to
> > > > your application classpath and see it work..yes?
> > > >
> > > > On Fri, Sep 16, 2011 at 12:58 PM, Konduru, Geetha
> > > > <Ge...@medco.com>wrote:
> > > >
> > > > > Just adding to last post , I am using log4j1.2.16 which is the
> one
> > > > used
> > > > > by chainsaw application too...
> > > > >
> > > > > -----Original Message-----
> > > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > > > Sent: Friday, September 16, 2011 3:26 PM
> > > > > To: Log4J Users List
> > > > > Subject: RE: log4j----Edit the event received
> > > > >
> > > > > Even for me it is working on chainsaw side.
> > > > > But if I have this on my application side where I define
> > > > SocketAppender
> > > > > , it is not working, I included components ,extras and receivers
> > > jars.
> > > > >
> > > > >
> > > > > Thank U,
> > > > > VGSS
> > > > >
> > > > > -----Original Message-----
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > Sent: Friday, September 16, 2011 3:03 PM
> > > > > To: Log4J Users List
> > > > > Subject: Re: log4j----Edit the event received
> > > > >
> > > > > I just tried this and it worked fine....I modified the Chainsaw
> > > config
> > > > > file
> > > > > I was using (anything received by Chainsaw can also be sent to
> > > > appenders
> > > > > defined in the same config)...configuration and example log file
> > > > output
> > > > > below:
> > > > >
> > > > > Here's what I added to the Chainsaw config file:
> > > > >   <appender name="F1" class="org.apache.log4j.FileAppender">
> > > > >       <param name="file" value="c:/temp/file.txt"/>
> > > > >       <param name="append" value="false"/>
> > > > >       <layout class="org.apache.log4j.PatternLayout">
> > > > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > > > p2:%X{p2}
> > > > > %m%n"/>
> > > > >       </layout>
> > > > >     </appender>
> > > > >
> > > > >
> > > > >     <appender name="A1"
> > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > > >       <appender-ref ref="F1"/>
> > > > >       <rewritePolicy
> > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > > >         <param name="properties"
> > > value="p1=Hello,p2=World,x1=3.1415"/>
> > > > >       </rewritePolicy>
> > > > >     </appender>
> > > > >
> > > > >   <root>
> > > > >      <level value="debug"/>
> > > > >       <appender-ref ref="A1" />
> > > > >    </root>
> > > > >
> > > > > And here is an example output line:
> > > > > DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE
> > RI-
> > > > > RI.DRI
> > > > >  FATAL ERROR WARNING INFO
> > > > >
> > > > >
> > > > > On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
> > > > > <Ge...@medco.com>wrote:
> > > > >
> > > > > > I tried this, its not working, following are warnings I get
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > log4j:WARN Continuable parsing error 48 and column 80
> > > > > >
> > > > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > > > >
> > > > > > log4j:WARN Continuable parsing error 52 and column 14
> > > > > >
> > > > > > log4j:WARN The content of element type "appender" must match
> > > > > >
> > > > >
> > > >
> > >
> >
> "(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > > > > ?,layout?,filter*,appender-ref*)".
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Adding an Appender to RewriteAppender is working fine, but
> > > assigning
> > > > > > rewritePolicy to a RewriteAppender is failing.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thank U,
> > > > > >
> > > > > > VGSS
> > > > > >
> > > > > >
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > > Sent: Friday, September 16, 2011 1:48 PM
> > > > > > To: Log4J Users List
> > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > >
> > > > > >
> > > > > > Here is an example from the tests in log4j:
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> > > > > >
> > > > >
> > > >
> > >
> >
> c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> > > > > > ev=564831
> > > > > >
> > > > > >
> > > > > >
> > > > > >     <appender name="F1" class="org.apache.log4j.FileAppender">
> > > > > >
> > > > > >       <param name="file" value="temp"/>
> > > > > >
> > > > > >       <param name="append" value="false"/>
> > > > > >
> > > > > >       <layout class="org.apache.log4j.PatternLayout">
> > > > > >
> > > > > >         <param name="ConversionPattern" value="%p %c -
> p1:%X{p1}
> > > > > > p2:%X{p2}
> > > > > >
> > > > > > %m%n"/>
> > > > > >
> > > > > >       </layout>
> > > > > >
> > > > > >     </appender>
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >     <appender name="A1"
> > > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > > > >
> > > > > >       <appender-ref ref="F1"/>
> > > > > >
> > > > > >       <rewritePolicy
> > > > > >
> > > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > > > >
> > > > > >         <param name="properties"
> > > > value="p1=Hello,p2=World,x1=3.1415"/>
> > > > > >
> > > > > >       </rewritePolicy>
> > > > > >
> > > > > >     </appender>
> > > > > >
> > > > > >
> > > > > >
> > > > > >     <root>
> > > > > >
> > > > > >       <level value ="debug" />
> > > > > >
> > > > > >       <appender-ref ref="A1" />
> > > > > >
> > > > > >     </root>
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
> > > > > >
> > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > > Would any one please give an example of xml configuration
> file
> > > > with
> > > > > >
> > > > > > > Rewrite Appender.
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > Thank U,
> > > > > >
> > > > > > > Vgss
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > >
> > > > > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > > > >
> > > > > > > Sent: Thursday, September 15, 2011 1:57 PM
> > > > > >
> > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > Subject: RE: log4j----Edit the event received
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > log4j: Trying to find [server2Rewritelog4j.xml] using
> context
> > > > > >
> > > > > > > classloader sun.misc.Launcher$AppClassLoader@601bb1.
> > > > > >
> > > > > > > log4j: Using URL
> > > > > >
> > > > > > >
> > > >
> [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> > > > > > for
> > > > > >
> > > > > > > automatic log4j configuration.
> > > > > >
> > > > > > > log4j: Preferred configurator class:
> > > > > >
> > > > > > > org.apache.log4j.xml.DOMConfigurator
> > > > > >
> > > > > > > log4j: System property is :null
> > > > > >
> > > > > > > log4j: Standard DocumentBuilderFactory search succeded.
> > > > > >
> > > > > > > log4j: DocumentBuilderFactory is:
> > > > > >
> > > > > > >
> > > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> > > > > >
> > > > > > > log4j:WARN Continuable parsing error 19 and column 97
> > > > > >
> > > > > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > > > >
> > > > > > > log4j:WARN Continuable parsing error 22 and column 12
> > > > > >
> > > > > > > log4j:WARN The content of element type "appender" must match
> > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > > > >
> > > > > > > ?,layout?,filter*,appender-ref*)".
> > > > > >
> > > > > > > log4j: debug attribute= "null".
> > > > > >
> > > > > > > log4j: Ignoring debug attribute.
> > > > > >
> > > > > > > log4j: reset attribute= "false".
> > > > > >
> > > > > > > log4j: Threshold ="null".
> > > > > >
> > > > > > > log4j: Level value for root is  [debug].
> > > > > >
> > > > > > > log4j: root level set to DEBUG
> > > > > >
> > > > > > > log4j: Class name: [org.apache.log4j.ConsoleAppender]
> > > > > >
> > > > > > > log4j: Parsing layout of class:
> > "org.apache.log4j.PatternLayout"
> > > > > >
> > > > > > > log4j: Setting property [conversionPattern] to [[%d{ISO8601}
> > %t
> > > > %c]
> > > > > >
> > > > > > > %m%n].
> > > > > >
> > > > > > > log4j: Adding appender named [CA] to category [root]
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > >
> > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > >
> > > > > > > Sent: Thursday, September 15, 2011 1:54 PM
> > > > > >
> > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > There is a DTD for core elements but alternate elements can
> be
> > > > added
> > > > > >
> > > > > > > (like
> > > > > >
> > > > > > > rewritepolicy)...you won't find rewritepolicy in the DTD.
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > Can you add -Dlog4j.debug=true to your appender-side java
> > > command,
> > > > > and
> > > > > >
> > > > > > > paste
> > > > > >
> > > > > > > the output?
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > Thanks
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > Scott
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
> > > > > >
> > > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > > Where can I find XMLschema file for log4j XML
> configuration
> > > > > file????
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > Thank U,
> > > > > >
> > > > > > > > VGSS
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > -----Original Message-----
> > > > > >
> > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > >
> > > > > > > > Sent: Wednesday, September 14, 2011 4:51 PM
> > > > > >
> > > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > Missed the end param on the nested properties param...not
> > sure
> > > > > about
> > > > > >
> > > > > > > > case of
> > > > > >
> > > > > > > > RewritePolicy node name..may be rewritePolicy.
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > <appender name="rewrite"
> > > > > >
> > > > > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > > > >
> > > > > > > >    <appender name="socket"
> > > > > >
> > > > > > > class="org.apache.log4j.net.SocketAppender">
> > > > > >
> > > > > > > >      <param name="Port" value="12346"/>
> > > > > >
> > > > > > > >      <param name="RemoteHost" value="localhost"/>
> > > > > >
> > > > > > > >      <param name="Application" value="app1"/>
> > > > > >
> > > > > > > >      <param name="ReconnectionDelay" value="60000"/>
> > > > > >
> > > > > > > >      <param name="Threshold" value="ALL"/>
> > > > > >
> > > > > > > >    </appender>
> > > > > >
> > > > > > > >    <RewritePolicy name="propertyPolicy"
> > > > > >
> > > > > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > > > >
> > > > > > > >        <param name="properties"
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> > > > > >
> > > > > > > > tyvalue2"/>
> > > > > >
> > > > > > > >    </RewritePolicy>
> > > > > >
> > > > > > > > </appender>
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> > > > > >
> > > > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > > > Thank U...
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > -----Original Message-----
> > > > > >
> > > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > >
> > > > > > > > > Sent: Wednesday, September 14, 2011 4:31 PM
> > > > > >
> > > > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > remoteSourceInfo contains the connected port:
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > hostName = socket.getInetAddress().getHostName();
> > > > > >
> > > > > > > > > remoteInfo = hostName + ":" + socket.getPort();
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> > > > > >
> > > > > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > > > yes, I got them
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > how are "hostname" and " log4j.remoteSourceInfo"
> > > different
> > > > > from
> > > > > >
> > > > > > > > each
> > > > > >
> > > > > > > > > > other....
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > thank U
> > > > > >
> > > > > > > > > > VGSS
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > >
> > > > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > >
> > > > > > > > > > Sent: Wednesday, September 14, 2011 4:15 PM
> > > > > >
> > > > > > > > > > To: Log4J Users List
> > > > > >
> > > > > > > > > > Subject: Re: log4j----Edit the event received
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > The SocketReceiver adds two properties to each event:
> > > > > >
> > > > > > > > > > hostname
> > > > > >
> > > > > > > > > > log4j.remoteSourceInfo
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > With the developer snapshot of Chainsaw you should see
> > > those
> > > > > as
> > > > > >
> > > > > > > > > > individual
> > > > > >
> > > > > > > > > > columns in the table.  If they aren't displayed by
> > default
> > > > you
> > > > > > can
> > > > > >
> > > > > > > > > > enable
> > > > > >
> > > > > > > > > > them via the tab preferences menu (select Columns).
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > Scott
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > > > > >
> > > > > > > > > > <Ge...@medco.com>wrote:
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > > > Hi,
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >  What I am looking for is, every event received by
> > > > > >
> > > > > > > SocketAppender,
> > > > > >
> > > > > > > > > > even
> > > > > >
> > > > > > > > > > > before it send to remote machine, it must append  to
> > the
> > > > > >
> > > > > > > event(on
> > > > > >
> > > > > > > > > > which
> > > > > >
> > > > > > > > > > > log4j is running).
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >  Can any one please tell me a solution for this.
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > > Example: if application(running on machine HOSTNAME)
> > > logs
> > > > > >
> > > > > > > message
> > > > > >
> > > > > > > > "I
> > > > > >
> > > > > > > > > > am
> > > > > >
> > > > > > > > > > > a Logging event", than SOCKET APPENDER must send
> > > following
> > > > > to
> > > > > >
> > > > > > > > REMOTE
> > > > > >
> > > > > > > > > > > machine(or SOCKET RECEIVER on Remote machine should
> > > > receive
> > > > > >
> > > > > > > > > following
> > > > > >
> > > > > > > > > > as
> > > > > >
> > > > > > > > > > > log message).
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > > "HOSTNAME:I am a Logging event"
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > > Thank U,
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > > VGSS
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > > >
> > > > > > > > > > > This e-mail message and any attachments contain
> > > > confidential
> > > > > >
> > > > > > > > > > information
> > > > > >
> > > > > > > > > > > from Medco. If you are not the intended recipient,
> you
> > > are
> > > > > >
> > > > > > > hereby
> > > > > >
> > > > > > > > > > notified
> > > > > >
> > > > > > > > > > > that disclosure, printing, copying, distribution, or
> > the
> > > > > > taking
> > > > > >
> > > > > > > of
> > > > > >
> > > > > > > > > any
> > > > > >
> > > > > > > > > > > action in reliance on the contents of this
> electronic
> > > > > >
> > > > > > > information
> > > > > >
> > > > > > > > is
> > > > > >
> > > > > > > > > > > strictly prohibited. If you have received this
> e-mail
> > > > > message
> > > > > > in
> > > > > >
> > > > > > > > > > error,
> > > > > >
> > > > > > > > > > > please immediately notify the sender by reply
> message
> > > and
> > > > > then
> > > > > >
> > > > > > > > > delete
> > > > > >
> > > > > > > > > > the
> > > > > >
> > > > > > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > >
> > **********************************************************************
> > > > > >
> > > > > > > > > > This e-mail message and any attachments contain
> > > confidential
> > > > > >
> > > > > > > > > information
> > > > > >
> > > > > > > > > > from Medco. If you are not the intended recipient, you
> > are
> > > > > > hereby
> > > > > >
> > > > > > > > > notified
> > > > > >
> > > > > > > > > > that disclosure, printing, copying, distribution, or
> the
> > > > > taking
> > > > > > of
> > > > > >
> > > > > > > > any
> > > > > >
> > > > > > > > > > action in reliance on the contents of this electronic
> > > > > > information
> > > > > >
> > > > > > > is
> > > > > >
> > > > > > > > > > strictly prohibited. If you have received this e-mail
> > > > message
> > > > > in
> > > > > >
> > > > > > > > > error,
> > > > > >
> > > > > > > > > > please immediately notify the sender by reply message
> > and
> > > > then
> > > > > >
> > > > > > > > delete
> > > > > >
> > > > > > > > > the
> > > > > >
> > > > > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > >
> > > > > > > > > > To unsubscribe, e-mail:
> > > > > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > > > > For additional commands, e-mail:
> > > > > >
> > > > > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > > >
> > > > > > > > > This e-mail message and any attachments contain
> > confidential
> > > > > >
> > > > > > > > information
> > > > > >
> > > > > > > > > from Medco. If you are not the intended recipient, you
> are
> > > > > hereby
> > > > > >
> > > > > > > > notified
> > > > > >
> > > > > > > > > that disclosure, printing, copying, distribution, or the
> > > > taking
> > > > > of
> > > > > >
> > > > > > > any
> > > > > >
> > > > > > > > > action in reliance on the contents of this electronic
> > > > > information
> > > > > > is
> > > > > >
> > > > > > > > > strictly prohibited. If you have received this e-mail
> > > message
> > > > in
> > > > > >
> > > > > > > > error,
> > > > > >
> > > > > > > > > please immediately notify the sender by reply message
> and
> > > then
> > > > > >
> > > > > > > delete
> > > > > >
> > > > > > > > the
> > > > > >
> > > > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > >
> > > > > > > > > To unsubscribe, e-mail:
> > > > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > > > For additional commands, e-mail:
> > > > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > >
> > **********************************************************************
> > > > > >
> > > > > > > > This e-mail message and any attachments contain
> confidential
> > > > > >
> > > > > > > information
> > > > > >
> > > > > > > > from Medco. If you are not the intended recipient, you are
> > > > hereby
> > > > > >
> > > > > > > notified
> > > > > >
> > > > > > > > that disclosure, printing, copying, distribution, or the
> > > taking
> > > > of
> > > > > > any
> > > > > >
> > > > > > > > action in reliance on the contents of this electronic
> > > > information
> > > > > is
> > > > > >
> > > > > > > > strictly prohibited. If you have received this e-mail
> > message
> > > in
> > > > > >
> > > > > > > error,
> > > > > >
> > > > > > > > please immediately notify the sender by reply message and
> > then
> > > > > > delete
> > > > > >
> > > > > > > the
> > > > > >
> > > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > >
> > > > > > > > To unsubscribe, e-mail:
> > > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > > For additional commands, e-mail:
> > > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > > >
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > > >
> > > > > > > This e-mail message and any attachments contain confidential
> > > > > > information
> > > > > >
> > > > > > > from Medco. If you are not the intended recipient, you are
> > > hereby
> > > > > >
> > > > > > > notified that disclosure, printing, copying, distribution,
> or
> > > the
> > > > > > taking
> > > > > >
> > > > > > > of any action in reliance on the contents of this electronic
> > > > > > information
> > > > > >
> > > > > > > is strictly prohibited. If you have received this e-mail
> > message
> > > > in
> > > > > >
> > > > > > > error, please immediately notify the sender by reply message
> > and
> > > > > then
> > > > > >
> > > > > > > delete the electronic message and any attachments.
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > >
> > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > > >
> > > > > > > This e-mail message and any attachments contain confidential
> > > > > > information
> > > > > >
> > > > > > > from Medco. If you are not the intended recipient, you are
> > > hereby
> > > > > > notified
> > > > > >
> > > > > > > that disclosure, printing, copying, distribution, or the
> > taking
> > > of
> > > > > any
> > > > > >
> > > > > > > action in reliance on the contents of this electronic
> > > information
> > > > is
> > > > > >
> > > > > > > strictly prohibited. If you have received this e-mail
> message
> > in
> > > > > > error,
> > > > > >
> > > > > > > please immediately notify the sender by reply message and
> then
> > > > > delete
> > > > > > the
> > > > > >
> > > > > > > electronic message and any attachments.
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > >
> > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > > > >
> > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > >
> > **********************************************************************
> > > > > > This e-mail message and any attachments contain confidential
> > > > > information
> > > > > > from Medco. If you are not the intended recipient, you are
> > hereby
> > > > > notified
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
> > of
> > > > any
> > > > > > action in reliance on the contents of this electronic
> > information
> > > is
> > > > > > strictly prohibited. If you have received this e-mail message
> in
> > > > > error,
> > > > > > please immediately notify the sender by reply message and then
> > > > delete
> > > > > the
> > > > > > electronic message and any attachments.
> > > > > >
> > > > >
> > > > >
> > >
> **********************************************************************
> > > > > This e-mail message and any attachments contain confidential
> > > > information
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > > > > notified that disclosure, printing, copying, distribution, or
> the
> > > > taking
> > > > > of any action in reliance on the contents of this electronic
> > > > information
> > > > > is strictly prohibited. If you have received this e-mail message
> > in
> > > > > error, please immediately notify the sender by reply message and
> > > then
> > > > > delete the electronic message and any attachments.
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > > >
> > > > >
> > >
> **********************************************************************
> > > > > This e-mail message and any attachments contain confidential
> > > > information
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > > > notified
> > > > > that disclosure, printing, copying, distribution, or the taking
> of
> > > any
> > > > > action in reliance on the contents of this electronic
> information
> > is
> > > > > strictly prohibited. If you have received this e-mail message in
> > > > error,
> > > > > please immediately notify the sender by reply message and then
> > > delete
> > > > the
> > > > > electronic message and any attachments.
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > **********************************************************************
> > > > This e-mail message and any attachments contain confidential
> > > information
> > > > from Medco. If you are not the intended recipient, you are hereby
> > > notified
> > > > that disclosure, printing, copying, distribution, or the taking of
> > any
> > > > action in reliance on the contents of this electronic information
> is
> > > > strictly prohibited. If you have received this e-mail message in
> > > error,
> > > > please immediately notify the sender by reply message and then
> > delete
> > > the
> > > > electronic message and any attachments.
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > > >
> > > >
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> >
> > **********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then delete
> the
> > electronic message and any attachments.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
> 
> **********************************************************************
> This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 



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


RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
No, regarding log4j I my classpath is same as chainsaw...

-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Monday, September 19, 2011 2:01 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

Do you have an old DTD in your classpath?

The log4j.dtd was updated to support 'plugin' back in rev 532603, Apr
2007.

Scott

On Mon, Sep 19, 2011 at 10:55 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Yes I did that, if I do that than it complaints about tag
> <reWritePolicy> and <plugin>.......
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Monday, September 19, 2011 1:39 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> Can you try adding these two lines to the top of your config?
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>
>
> Not sure why you're having this problem..
>
> Scott
>
> On Mon, Sep 19, 2011 at 10:19 AM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> >
> >
> > I used the config from following link exactly.... I still get
> following
> > exception
> >
> > log4j:WARN Continuable parsing error 1 and column 69
> > log4j:WARN Document root element "log4j:configuration", must match
> > DOCTYPE root "null".
> > log4j:WARN Continuable parsing error 1 and column 69
> > log4j:WARN Document is invalid: no grammar found.
> >
> >
> >
> > It looks like parsing is different in chainsaw application from my
> > Application, my classpath is exactly same.....
> >
> >
> > Weird!!!!!
> >
> > Thank U,
> > VGSS
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Monday, September 19, 2011 1:13 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > I haven't seen that issue before...you should be able to use any of
> the
> > configuration files in the test folder:
> >
> >
>
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> >
>
c/test/resources/org/apache/log4j/rewrite/map.xml?revision=564831&view=m
> > arkup
> >
> > On Mon, Sep 19, 2011 at 9:46 AM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > I used the same log4j.xml I used by chainsaw in my application and
> > > exactly same classpath , than I get following exception.
> > >
> > >
> > > log4j:WARN Continuable parsing error 2 and column 82
> > > log4j:WARN Document root element "log4j:configuration", must match
> > > DOCTYPE root "null".
> > > log4j:WARN Continuable parsing error 2 and column 82
> > > log4j:WARN Document is invalid: no grammar found.
> > >
> > >
> > > Chainsaw config is.
> > >
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
> > > debug="true">
> > >    <plugin class="org.apache.log4j.net.SocketReceiver"
> > > name="SocketReceiver-12346">
> > >        <param name="active" value="true"/>
> > >        <param name="advertiseViaMulticastDNS" value="false"/>
> > >        <param name="class" value="class
> > > org.apache.log4j.net.SocketReceiver"/>
> > >        <param name="connectedSocketDetails" value="[]"/>
> > >        <param name="name" value="SocketReceiver-12346"/>
> > >        <param name="paused" value="false"/>
> > >        <param name="port" value="12346"/>
> > >        <param name="threshold" value="TRACE"/>
> > >    </plugin>
> > >   <appender name="F1" class="org.apache.log4j.FileAppender">
> > >        <param name="file" value="c:/LogsDir/file.txt"/>
> > >        <param name="append" value="false"/>
> > >       <layout class="org.apache.log4j.PatternLayout">
> > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > p2:%X{p2} %m%n"/>
> > >       </layout>
> > >     </appender>
> > >
> > >
> > >     <appender name="A1"
> > > class="org.apache.log4j.rewrite.RewriteAppender">
> > >       <appender-ref ref="F1"/>
> > >       <rewritePolicy
> > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > >         <param name="properties"
> value="p1=Hello,p2=World,x1=3.1415"/>
> > >       </rewritePolicy>
> > >     </appender>
> > >
> > >   <root>
> > >      <level value="debug"/>
> > >       <appender-ref ref="A1" />
> > >    </root>
> > >
> > > </log4j:configuration>
> > >
> > > This makes me to think that is chainsaw code responsible for
making
> it
> > > to work???????????????????????
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > Sent: Friday, September 16, 2011 4:03 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j----Edit the event received
> > >
> > > In theory then, you should be able to add the entire chainsaw
> > classpath
> > > to
> > > your application classpath and see it work..yes?
> > >
> > > On Fri, Sep 16, 2011 at 12:58 PM, Konduru, Geetha
> > > <Ge...@medco.com>wrote:
> > >
> > > > Just adding to last post , I am using log4j1.2.16 which is the
one
> > > used
> > > > by chainsaw application too...
> > > >
> > > > -----Original Message-----
> > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > > Sent: Friday, September 16, 2011 3:26 PM
> > > > To: Log4J Users List
> > > > Subject: RE: log4j----Edit the event received
> > > >
> > > > Even for me it is working on chainsaw side.
> > > > But if I have this on my application side where I define
> > > SocketAppender
> > > > , it is not working, I included components ,extras and receivers
> > jars.
> > > >
> > > >
> > > > Thank U,
> > > > VGSS
> > > >
> > > > -----Original Message-----
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > Sent: Friday, September 16, 2011 3:03 PM
> > > > To: Log4J Users List
> > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > I just tried this and it worked fine....I modified the Chainsaw
> > config
> > > > file
> > > > I was using (anything received by Chainsaw can also be sent to
> > > appenders
> > > > defined in the same config)...configuration and example log file
> > > output
> > > > below:
> > > >
> > > > Here's what I added to the Chainsaw config file:
> > > >   <appender name="F1" class="org.apache.log4j.FileAppender">
> > > >       <param name="file" value="c:/temp/file.txt"/>
> > > >       <param name="append" value="false"/>
> > > >       <layout class="org.apache.log4j.PatternLayout">
> > > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > > p2:%X{p2}
> > > > %m%n"/>
> > > >       </layout>
> > > >     </appender>
> > > >
> > > >
> > > >     <appender name="A1"
> > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > >       <appender-ref ref="F1"/>
> > > >       <rewritePolicy
> > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > >         <param name="properties"
> > value="p1=Hello,p2=World,x1=3.1415"/>
> > > >       </rewritePolicy>
> > > >     </appender>
> > > >
> > > >   <root>
> > > >      <level value="debug"/>
> > > >       <appender-ref ref="A1" />
> > > >    </root>
> > > >
> > > > And here is an example output line:
> > > > DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE
> RI-
> > > > RI.DRI
> > > >  FATAL ERROR WARNING INFO
> > > >
> > > >
> > > > On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
> > > > <Ge...@medco.com>wrote:
> > > >
> > > > > I tried this, its not working, following are warnings I get
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > log4j:WARN Continuable parsing error 48 and column 80
> > > > >
> > > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > > >
> > > > > log4j:WARN Continuable parsing error 52 and column 14
> > > > >
> > > > > log4j:WARN The content of element type "appender" must match
> > > > >
> > > >
> > >
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > > > ?,layout?,filter*,appender-ref*)".
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Adding an Appender to RewriteAppender is working fine, but
> > assigning
> > > > > rewritePolicy to a RewriteAppender is failing.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Thank U,
> > > > >
> > > > > VGSS
> > > > >
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > Sent: Friday, September 16, 2011 1:48 PM
> > > > > To: Log4J Users List
> > > > > Subject: Re: log4j----Edit the event received
> > > > >
> > > > >
> > > > >
> > > > > Here is an example from the tests in log4j:
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> > > > >
> > > >
> > >
> >
>
c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> > > > > ev=564831
> > > > >
> > > > >
> > > > >
> > > > >     <appender name="F1" class="org.apache.log4j.FileAppender">
> > > > >
> > > > >       <param name="file" value="temp"/>
> > > > >
> > > > >       <param name="append" value="false"/>
> > > > >
> > > > >       <layout class="org.apache.log4j.PatternLayout">
> > > > >
> > > > >         <param name="ConversionPattern" value="%p %c -
p1:%X{p1}
> > > > > p2:%X{p2}
> > > > >
> > > > > %m%n"/>
> > > > >
> > > > >       </layout>
> > > > >
> > > > >     </appender>
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >     <appender name="A1"
> > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > > >
> > > > >       <appender-ref ref="F1"/>
> > > > >
> > > > >       <rewritePolicy
> > > > >
> > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > > >
> > > > >         <param name="properties"
> > > value="p1=Hello,p2=World,x1=3.1415"/>
> > > > >
> > > > >       </rewritePolicy>
> > > > >
> > > > >     </appender>
> > > > >
> > > > >
> > > > >
> > > > >     <root>
> > > > >
> > > > >       <level value ="debug" />
> > > > >
> > > > >       <appender-ref ref="A1" />
> > > > >
> > > > >     </root>
> > > > >
> > > > >
> > > > >
> > > > > On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
> > > > >
> > > > > <Ge...@medco.com>wrote:
> > > > >
> > > > >
> > > > >
> > > > > > Would any one please give an example of xml configuration
file
> > > with
> > > > >
> > > > > > Rewrite Appender.
> > > > >
> > > > > >
> > > > >
> > > > > > Thank U,
> > > > >
> > > > > > Vgss
> > > > >
> > > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > >
> > > > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > > >
> > > > > > Sent: Thursday, September 15, 2011 1:57 PM
> > > > >
> > > > > > To: Log4J Users List
> > > > >
> > > > > > Subject: RE: log4j----Edit the event received
> > > > >
> > > > > >
> > > > >
> > > > > > log4j: Trying to find [server2Rewritelog4j.xml] using
context
> > > > >
> > > > > > classloader sun.misc.Launcher$AppClassLoader@601bb1.
> > > > >
> > > > > > log4j: Using URL
> > > > >
> > > > > >
> > >
[file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> > > > > for
> > > > >
> > > > > > automatic log4j configuration.
> > > > >
> > > > > > log4j: Preferred configurator class:
> > > > >
> > > > > > org.apache.log4j.xml.DOMConfigurator
> > > > >
> > > > > > log4j: System property is :null
> > > > >
> > > > > > log4j: Standard DocumentBuilderFactory search succeded.
> > > > >
> > > > > > log4j: DocumentBuilderFactory is:
> > > > >
> > > > > >
> > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> > > > >
> > > > > > log4j:WARN Continuable parsing error 19 and column 97
> > > > >
> > > > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > > >
> > > > > > log4j:WARN Continuable parsing error 22 and column 12
> > > > >
> > > > > > log4j:WARN The content of element type "appender" must match
> > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > > >
> > > > > > ?,layout?,filter*,appender-ref*)".
> > > > >
> > > > > > log4j: debug attribute= "null".
> > > > >
> > > > > > log4j: Ignoring debug attribute.
> > > > >
> > > > > > log4j: reset attribute= "false".
> > > > >
> > > > > > log4j: Threshold ="null".
> > > > >
> > > > > > log4j: Level value for root is  [debug].
> > > > >
> > > > > > log4j: root level set to DEBUG
> > > > >
> > > > > > log4j: Class name: [org.apache.log4j.ConsoleAppender]
> > > > >
> > > > > > log4j: Parsing layout of class:
> "org.apache.log4j.PatternLayout"
> > > > >
> > > > > > log4j: Setting property [conversionPattern] to [[%d{ISO8601}
> %t
> > > %c]
> > > > >
> > > > > > %m%n].
> > > > >
> > > > > > log4j: Adding appender named [CA] to category [root]
> > > > >
> > > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > >
> > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > >
> > > > > > Sent: Thursday, September 15, 2011 1:54 PM
> > > > >
> > > > > > To: Log4J Users List
> > > > >
> > > > > > Subject: Re: log4j----Edit the event received
> > > > >
> > > > > >
> > > > >
> > > > > > There is a DTD for core elements but alternate elements can
be
> > > added
> > > > >
> > > > > > (like
> > > > >
> > > > > > rewritepolicy)...you won't find rewritepolicy in the DTD.
> > > > >
> > > > > >
> > > > >
> > > > > > Can you add -Dlog4j.debug=true to your appender-side java
> > command,
> > > > and
> > > > >
> > > > > > paste
> > > > >
> > > > > > the output?
> > > > >
> > > > > >
> > > > >
> > > > > > Thanks
> > > > >
> > > > > >
> > > > >
> > > > > > Scott
> > > > >
> > > > > >
> > > > >
> > > > > > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
> > > > >
> > > > > > <Ge...@medco.com>wrote:
> > > > >
> > > > > >
> > > > >
> > > > > > > Where can I find XMLschema file for log4j XML
configuration
> > > > file????
> > > > >
> > > > > > >
> > > > >
> > > > > > >
> > > > >
> > > > > > > Thank U,
> > > > >
> > > > > > > VGSS
> > > > >
> > > > > > >
> > > > >
> > > > > > > -----Original Message-----
> > > > >
> > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > >
> > > > > > > Sent: Wednesday, September 14, 2011 4:51 PM
> > > > >
> > > > > > > To: Log4J Users List
> > > > >
> > > > > > > Subject: Re: log4j----Edit the event received
> > > > >
> > > > > > >
> > > > >
> > > > > > > Missed the end param on the nested properties param...not
> sure
> > > > about
> > > > >
> > > > > > > case of
> > > > >
> > > > > > > RewritePolicy node name..may be rewritePolicy.
> > > > >
> > > > > > >
> > > > >
> > > > > > > <appender name="rewrite"
> > > > >
> > > > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > > >
> > > > > > >    <appender name="socket"
> > > > >
> > > > > > class="org.apache.log4j.net.SocketAppender">
> > > > >
> > > > > > >      <param name="Port" value="12346"/>
> > > > >
> > > > > > >      <param name="RemoteHost" value="localhost"/>
> > > > >
> > > > > > >      <param name="Application" value="app1"/>
> > > > >
> > > > > > >      <param name="ReconnectionDelay" value="60000"/>
> > > > >
> > > > > > >      <param name="Threshold" value="ALL"/>
> > > > >
> > > > > > >    </appender>
> > > > >
> > > > > > >    <RewritePolicy name="propertyPolicy"
> > > > >
> > > > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > > >
> > > > > > >        <param name="properties"
> > > > >
> > > > > > >
> > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> > > > >
> > > > > > > tyvalue2"/>
> > > > >
> > > > > > >    </RewritePolicy>
> > > > >
> > > > > > > </appender>
> > > > >
> > > > > > >
> > > > >
> > > > > > >
> > > > >
> > > > > > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> > > > >
> > > > > > > <Ge...@medco.com>wrote:
> > > > >
> > > > > > >
> > > > >
> > > > > > > > Thank U...
> > > > >
> > > > > > > >
> > > > >
> > > > > > > > -----Original Message-----
> > > > >
> > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > >
> > > > > > > > Sent: Wednesday, September 14, 2011 4:31 PM
> > > > >
> > > > > > > > To: Log4J Users List
> > > > >
> > > > > > > > Subject: Re: log4j----Edit the event received
> > > > >
> > > > > > > >
> > > > >
> > > > > > > > remoteSourceInfo contains the connected port:
> > > > >
> > > > > > > >
> > > > >
> > > > > > > > hostName = socket.getInetAddress().getHostName();
> > > > >
> > > > > > > > remoteInfo = hostName + ":" + socket.getPort();
> > > > >
> > > > > > > >
> > > > >
> > > > > > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> > > > >
> > > > > > > > <Ge...@medco.com>wrote:
> > > > >
> > > > > > > >
> > > > >
> > > > > > > > > yes, I got them
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > how are "hostname" and " log4j.remoteSourceInfo"
> > different
> > > > from
> > > > >
> > > > > > > each
> > > > >
> > > > > > > > > other....
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > thank U
> > > > >
> > > > > > > > > VGSS
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > -----Original Message-----
> > > > >
> > > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > >
> > > > > > > > > Sent: Wednesday, September 14, 2011 4:15 PM
> > > > >
> > > > > > > > > To: Log4J Users List
> > > > >
> > > > > > > > > Subject: Re: log4j----Edit the event received
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > The SocketReceiver adds two properties to each event:
> > > > >
> > > > > > > > > hostname
> > > > >
> > > > > > > > > log4j.remoteSourceInfo
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > With the developer snapshot of Chainsaw you should see
> > those
> > > > as
> > > > >
> > > > > > > > > individual
> > > > >
> > > > > > > > > columns in the table.  If they aren't displayed by
> default
> > > you
> > > > > can
> > > > >
> > > > > > > > > enable
> > > > >
> > > > > > > > > them via the tab preferences menu (select Columns).
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > Scott
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > > > >
> > > > > > > > > <Ge...@medco.com>wrote:
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > > Hi,
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >  What I am looking for is, every event received by
> > > > >
> > > > > > SocketAppender,
> > > > >
> > > > > > > > > even
> > > > >
> > > > > > > > > > before it send to remote machine, it must append  to
> the
> > > > >
> > > > > > event(on
> > > > >
> > > > > > > > > which
> > > > >
> > > > > > > > > > log4j is running).
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >  Can any one please tell me a solution for this.
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > > Example: if application(running on machine HOSTNAME)
> > logs
> > > > >
> > > > > > message
> > > > >
> > > > > > > "I
> > > > >
> > > > > > > > > am
> > > > >
> > > > > > > > > > a Logging event", than SOCKET APPENDER must send
> > following
> > > > to
> > > > >
> > > > > > > REMOTE
> > > > >
> > > > > > > > > > machine(or SOCKET RECEIVER on Remote machine should
> > > receive
> > > > >
> > > > > > > > following
> > > > >
> > > > > > > > > as
> > > > >
> > > > > > > > > > log message).
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > > "HOSTNAME:I am a Logging event"
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > > Thank U,
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > > VGSS
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > >
> > > > >
> > > > > >
> > > >
> >
**********************************************************************
> > > > >
> > > > > > > > > > This e-mail message and any attachments contain
> > > confidential
> > > > >
> > > > > > > > > information
> > > > >
> > > > > > > > > > from Medco. If you are not the intended recipient,
you
> > are
> > > > >
> > > > > > hereby
> > > > >
> > > > > > > > > notified
> > > > >
> > > > > > > > > > that disclosure, printing, copying, distribution, or
> the
> > > > > taking
> > > > >
> > > > > > of
> > > > >
> > > > > > > > any
> > > > >
> > > > > > > > > > action in reliance on the contents of this
electronic
> > > > >
> > > > > > information
> > > > >
> > > > > > > is
> > > > >
> > > > > > > > > > strictly prohibited. If you have received this
e-mail
> > > > message
> > > > > in
> > > > >
> > > > > > > > > error,
> > > > >
> > > > > > > > > > please immediately notify the sender by reply
message
> > and
> > > > then
> > > > >
> > > > > > > > delete
> > > > >
> > > > > > > > > the
> > > > >
> > > > > > > > > > electronic message and any attachments.
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > >
> > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > >
> > > > > > > > > This e-mail message and any attachments contain
> > confidential
> > > > >
> > > > > > > > information
> > > > >
> > > > > > > > > from Medco. If you are not the intended recipient, you
> are
> > > > > hereby
> > > > >
> > > > > > > > notified
> > > > >
> > > > > > > > > that disclosure, printing, copying, distribution, or
the
> > > > taking
> > > > > of
> > > > >
> > > > > > > any
> > > > >
> > > > > > > > > action in reliance on the contents of this electronic
> > > > > information
> > > > >
> > > > > > is
> > > > >
> > > > > > > > > strictly prohibited. If you have received this e-mail
> > > message
> > > > in
> > > > >
> > > > > > > > error,
> > > > >
> > > > > > > > > please immediately notify the sender by reply message
> and
> > > then
> > > > >
> > > > > > > delete
> > > > >
> > > > > > > > the
> > > > >
> > > > > > > > > electronic message and any attachments.
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > >
> > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > >
> > > > > > > > > To unsubscribe, e-mail:
> > > > > log4j-user-unsubscribe@logging.apache.org
> > > > >
> > > > > > > > > For additional commands, e-mail:
> > > > >
> > > > > > log4j-user-help@logging.apache.org
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > >
> > > > >
> > > > > > > >
> > > > >
> > > > > >
> > > >
> >
**********************************************************************
> > > > >
> > > > > > > > This e-mail message and any attachments contain
> confidential
> > > > >
> > > > > > > information
> > > > >
> > > > > > > > from Medco. If you are not the intended recipient, you
are
> > > > hereby
> > > > >
> > > > > > > notified
> > > > >
> > > > > > > > that disclosure, printing, copying, distribution, or the
> > > taking
> > > > of
> > > > >
> > > > > > any
> > > > >
> > > > > > > > action in reliance on the contents of this electronic
> > > > information
> > > > > is
> > > > >
> > > > > > > > strictly prohibited. If you have received this e-mail
> > message
> > > in
> > > > >
> > > > > > > error,
> > > > >
> > > > > > > > please immediately notify the sender by reply message
and
> > then
> > > > >
> > > > > > delete
> > > > >
> > > > > > > the
> > > > >
> > > > > > > > electronic message and any attachments.
> > > > >
> > > > > > > >
> > > > >
> > > > > > > >
> > > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > >
> > > > > > > > To unsubscribe, e-mail:
> > > > log4j-user-unsubscribe@logging.apache.org
> > > > >
> > > > > > > > For additional commands, e-mail:
> > > > > log4j-user-help@logging.apache.org
> > > > >
> > > > > > > >
> > > > >
> > > > > > > >
> > > > >
> > > > > > >
> > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > >
> > > > > > > This e-mail message and any attachments contain
confidential
> > > > >
> > > > > > information
> > > > >
> > > > > > > from Medco. If you are not the intended recipient, you are
> > > hereby
> > > > >
> > > > > > notified
> > > > >
> > > > > > > that disclosure, printing, copying, distribution, or the
> > taking
> > > of
> > > > > any
> > > > >
> > > > > > > action in reliance on the contents of this electronic
> > > information
> > > > is
> > > > >
> > > > > > > strictly prohibited. If you have received this e-mail
> message
> > in
> > > > >
> > > > > > error,
> > > > >
> > > > > > > please immediately notify the sender by reply message and
> then
> > > > > delete
> > > > >
> > > > > > the
> > > > >
> > > > > > > electronic message and any attachments.
> > > > >
> > > > > > >
> > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > >
> > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > > >
> > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > > >
> > > > > > >
> > > > >
> > > > > > >
> > > > >
> > > > > >
> > > > >
> > > > > >
> > > >
> >
**********************************************************************
> > > > >
> > > > > > This e-mail message and any attachments contain confidential
> > > > > information
> > > > >
> > > > > > from Medco. If you are not the intended recipient, you are
> > hereby
> > > > >
> > > > > > notified that disclosure, printing, copying, distribution,
or
> > the
> > > > > taking
> > > > >
> > > > > > of any action in reliance on the contents of this electronic
> > > > > information
> > > > >
> > > > > > is strictly prohibited. If you have received this e-mail
> message
> > > in
> > > > >
> > > > > > error, please immediately notify the sender by reply message
> and
> > > > then
> > > > >
> > > > > > delete the electronic message and any attachments.
> > > > >
> > > > > >
> > > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > >
> > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> > > > >
> > > > > > For additional commands, e-mail:
> > > log4j-user-help@logging.apache.org
> > > > >
> > > > > >
> > > > >
> > > > > >
> > > >
> >
**********************************************************************
> > > > >
> > > > > > This e-mail message and any attachments contain confidential
> > > > > information
> > > > >
> > > > > > from Medco. If you are not the intended recipient, you are
> > hereby
> > > > > notified
> > > > >
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
> > of
> > > > any
> > > > >
> > > > > > action in reliance on the contents of this electronic
> > information
> > > is
> > > > >
> > > > > > strictly prohibited. If you have received this e-mail
message
> in
> > > > > error,
> > > > >
> > > > > > please immediately notify the sender by reply message and
then
> > > > delete
> > > > > the
> > > > >
> > > > > > electronic message and any attachments.
> > > > >
> > > > > >
> > > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > >
> > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> > > > >
> > > > > > For additional commands, e-mail:
> > > log4j-user-help@logging.apache.org
> > > > >
> > > > > >
> > > > >
> > > > > >
> > > > >
> > > > >
> > >
> **********************************************************************
> > > > > This e-mail message and any attachments contain confidential
> > > > information
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > > > notified
> > > > > that disclosure, printing, copying, distribution, or the
taking
> of
> > > any
> > > > > action in reliance on the contents of this electronic
> information
> > is
> > > > > strictly prohibited. If you have received this e-mail message
in
> > > > error,
> > > > > please immediately notify the sender by reply message and then
> > > delete
> > > > the
> > > > > electronic message and any attachments.
> > > > >
> > > >
> > > >
> >
**********************************************************************
> > > > This e-mail message and any attachments contain confidential
> > > information
> > > > from Medco. If you are not the intended recipient, you are
hereby
> > > > notified that disclosure, printing, copying, distribution, or
the
> > > taking
> > > > of any action in reliance on the contents of this electronic
> > > information
> > > > is strictly prohibited. If you have received this e-mail message
> in
> > > > error, please immediately notify the sender by reply message and
> > then
> > > > delete the electronic message and any attachments.
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > > >
> > > >
> >
**********************************************************************
> > > > This e-mail message and any attachments contain confidential
> > > information
> > > > from Medco. If you are not the intended recipient, you are
hereby
> > > notified
> > > > that disclosure, printing, copying, distribution, or the taking
of
> > any
> > > > action in reliance on the contents of this electronic
information
> is
> > > > strictly prohibited. If you have received this e-mail message in
> > > error,
> > > > please immediately notify the sender by reply message and then
> > delete
> > > the
> > > > electronic message and any attachments.
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > > >
> > > >
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information
is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail:
log4j-user-help@logging.apache.org
> > >
> > >
> >
> >
**********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of
any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then
delete
> the
> > electronic message and any attachments.
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


Re: log4j----Edit the event received

Posted by Scott Deboy <sc...@gmail.com>.
Do you have an old DTD in your classpath?

The log4j.dtd was updated to support 'plugin' back in rev 532603, Apr 2007.

Scott

On Mon, Sep 19, 2011 at 10:55 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Yes I did that, if I do that than it complaints about tag
> <reWritePolicy> and <plugin>.......
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Monday, September 19, 2011 1:39 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> Can you try adding these two lines to the top of your config?
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>
>
> Not sure why you're having this problem..
>
> Scott
>
> On Mon, Sep 19, 2011 at 10:19 AM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> >
> >
> > I used the config from following link exactly.... I still get
> following
> > exception
> >
> > log4j:WARN Continuable parsing error 1 and column 69
> > log4j:WARN Document root element "log4j:configuration", must match
> > DOCTYPE root "null".
> > log4j:WARN Continuable parsing error 1 and column 69
> > log4j:WARN Document is invalid: no grammar found.
> >
> >
> >
> > It looks like parsing is different in chainsaw application from my
> > Application, my classpath is exactly same.....
> >
> >
> > Weird!!!!!
> >
> > Thank U,
> > VGSS
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Monday, September 19, 2011 1:13 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > I haven't seen that issue before...you should be able to use any of
> the
> > configuration files in the test folder:
> >
> >
> http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> >
> c/test/resources/org/apache/log4j/rewrite/map.xml?revision=564831&view=m
> > arkup
> >
> > On Mon, Sep 19, 2011 at 9:46 AM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > I used the same log4j.xml I used by chainsaw in my application and
> > > exactly same classpath , than I get following exception.
> > >
> > >
> > > log4j:WARN Continuable parsing error 2 and column 82
> > > log4j:WARN Document root element "log4j:configuration", must match
> > > DOCTYPE root "null".
> > > log4j:WARN Continuable parsing error 2 and column 82
> > > log4j:WARN Document is invalid: no grammar found.
> > >
> > >
> > > Chainsaw config is.
> > >
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> > > debug="true">
> > >    <plugin class="org.apache.log4j.net.SocketReceiver"
> > > name="SocketReceiver-12346">
> > >        <param name="active" value="true"/>
> > >        <param name="advertiseViaMulticastDNS" value="false"/>
> > >        <param name="class" value="class
> > > org.apache.log4j.net.SocketReceiver"/>
> > >        <param name="connectedSocketDetails" value="[]"/>
> > >        <param name="name" value="SocketReceiver-12346"/>
> > >        <param name="paused" value="false"/>
> > >        <param name="port" value="12346"/>
> > >        <param name="threshold" value="TRACE"/>
> > >    </plugin>
> > >   <appender name="F1" class="org.apache.log4j.FileAppender">
> > >        <param name="file" value="c:/LogsDir/file.txt"/>
> > >        <param name="append" value="false"/>
> > >       <layout class="org.apache.log4j.PatternLayout">
> > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > p2:%X{p2} %m%n"/>
> > >       </layout>
> > >     </appender>
> > >
> > >
> > >     <appender name="A1"
> > > class="org.apache.log4j.rewrite.RewriteAppender">
> > >       <appender-ref ref="F1"/>
> > >       <rewritePolicy
> > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > >         <param name="properties"
> value="p1=Hello,p2=World,x1=3.1415"/>
> > >       </rewritePolicy>
> > >     </appender>
> > >
> > >   <root>
> > >      <level value="debug"/>
> > >       <appender-ref ref="A1" />
> > >    </root>
> > >
> > > </log4j:configuration>
> > >
> > > This makes me to think that is chainsaw code responsible for making
> it
> > > to work???????????????????????
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > Sent: Friday, September 16, 2011 4:03 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j----Edit the event received
> > >
> > > In theory then, you should be able to add the entire chainsaw
> > classpath
> > > to
> > > your application classpath and see it work..yes?
> > >
> > > On Fri, Sep 16, 2011 at 12:58 PM, Konduru, Geetha
> > > <Ge...@medco.com>wrote:
> > >
> > > > Just adding to last post , I am using log4j1.2.16 which is the one
> > > used
> > > > by chainsaw application too...
> > > >
> > > > -----Original Message-----
> > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > > Sent: Friday, September 16, 2011 3:26 PM
> > > > To: Log4J Users List
> > > > Subject: RE: log4j----Edit the event received
> > > >
> > > > Even for me it is working on chainsaw side.
> > > > But if I have this on my application side where I define
> > > SocketAppender
> > > > , it is not working, I included components ,extras and receivers
> > jars.
> > > >
> > > >
> > > > Thank U,
> > > > VGSS
> > > >
> > > > -----Original Message-----
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > Sent: Friday, September 16, 2011 3:03 PM
> > > > To: Log4J Users List
> > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > I just tried this and it worked fine....I modified the Chainsaw
> > config
> > > > file
> > > > I was using (anything received by Chainsaw can also be sent to
> > > appenders
> > > > defined in the same config)...configuration and example log file
> > > output
> > > > below:
> > > >
> > > > Here's what I added to the Chainsaw config file:
> > > >   <appender name="F1" class="org.apache.log4j.FileAppender">
> > > >       <param name="file" value="c:/temp/file.txt"/>
> > > >       <param name="append" value="false"/>
> > > >       <layout class="org.apache.log4j.PatternLayout">
> > > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > > p2:%X{p2}
> > > > %m%n"/>
> > > >       </layout>
> > > >     </appender>
> > > >
> > > >
> > > >     <appender name="A1"
> > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > >       <appender-ref ref="F1"/>
> > > >       <rewritePolicy
> > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > >         <param name="properties"
> > value="p1=Hello,p2=World,x1=3.1415"/>
> > > >       </rewritePolicy>
> > > >     </appender>
> > > >
> > > >   <root>
> > > >      <level value="debug"/>
> > > >       <appender-ref ref="A1" />
> > > >    </root>
> > > >
> > > > And here is an example output line:
> > > > DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE
> RI-
> > > > RI.DRI
> > > >  FATAL ERROR WARNING INFO
> > > >
> > > >
> > > > On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
> > > > <Ge...@medco.com>wrote:
> > > >
> > > > > I tried this, its not working, following are warnings I get
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > log4j:WARN Continuable parsing error 48 and column 80
> > > > >
> > > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > > >
> > > > > log4j:WARN Continuable parsing error 52 and column 14
> > > > >
> > > > > log4j:WARN The content of element type "appender" must match
> > > > >
> > > >
> > >
> >
> "(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > > > ?,layout?,filter*,appender-ref*)".
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Adding an Appender to RewriteAppender is working fine, but
> > assigning
> > > > > rewritePolicy to a RewriteAppender is failing.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Thank U,
> > > > >
> > > > > VGSS
> > > > >
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > > Sent: Friday, September 16, 2011 1:48 PM
> > > > > To: Log4J Users List
> > > > > Subject: Re: log4j----Edit the event received
> > > > >
> > > > >
> > > > >
> > > > > Here is an example from the tests in log4j:
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> > > > >
> > > >
> > >
> >
> c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> > > > > ev=564831
> > > > >
> > > > >
> > > > >
> > > > >     <appender name="F1" class="org.apache.log4j.FileAppender">
> > > > >
> > > > >       <param name="file" value="temp"/>
> > > > >
> > > > >       <param name="append" value="false"/>
> > > > >
> > > > >       <layout class="org.apache.log4j.PatternLayout">
> > > > >
> > > > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > > > p2:%X{p2}
> > > > >
> > > > > %m%n"/>
> > > > >
> > > > >       </layout>
> > > > >
> > > > >     </appender>
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >     <appender name="A1"
> > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > > >
> > > > >       <appender-ref ref="F1"/>
> > > > >
> > > > >       <rewritePolicy
> > > > >
> > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > > >
> > > > >         <param name="properties"
> > > value="p1=Hello,p2=World,x1=3.1415"/>
> > > > >
> > > > >       </rewritePolicy>
> > > > >
> > > > >     </appender>
> > > > >
> > > > >
> > > > >
> > > > >     <root>
> > > > >
> > > > >       <level value ="debug" />
> > > > >
> > > > >       <appender-ref ref="A1" />
> > > > >
> > > > >     </root>
> > > > >
> > > > >
> > > > >
> > > > > On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
> > > > >
> > > > > <Ge...@medco.com>wrote:
> > > > >
> > > > >
> > > > >
> > > > > > Would any one please give an example of xml configuration file
> > > with
> > > > >
> > > > > > Rewrite Appender.
> > > > >
> > > > > >
> > > > >
> > > > > > Thank U,
> > > > >
> > > > > > Vgss
> > > > >
> > > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > >
> > > > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > > >
> > > > > > Sent: Thursday, September 15, 2011 1:57 PM
> > > > >
> > > > > > To: Log4J Users List
> > > > >
> > > > > > Subject: RE: log4j----Edit the event received
> > > > >
> > > > > >
> > > > >
> > > > > > log4j: Trying to find [server2Rewritelog4j.xml] using context
> > > > >
> > > > > > classloader sun.misc.Launcher$AppClassLoader@601bb1.
> > > > >
> > > > > > log4j: Using URL
> > > > >
> > > > > >
> > > [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> > > > > for
> > > > >
> > > > > > automatic log4j configuration.
> > > > >
> > > > > > log4j: Preferred configurator class:
> > > > >
> > > > > > org.apache.log4j.xml.DOMConfigurator
> > > > >
> > > > > > log4j: System property is :null
> > > > >
> > > > > > log4j: Standard DocumentBuilderFactory search succeded.
> > > > >
> > > > > > log4j: DocumentBuilderFactory is:
> > > > >
> > > > > >
> > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> > > > >
> > > > > > log4j:WARN Continuable parsing error 19 and column 97
> > > > >
> > > > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > > >
> > > > > > log4j:WARN Continuable parsing error 22 and column 12
> > > > >
> > > > > > log4j:WARN The content of element type "appender" must match
> > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > > >
> > > > > > ?,layout?,filter*,appender-ref*)".
> > > > >
> > > > > > log4j: debug attribute= "null".
> > > > >
> > > > > > log4j: Ignoring debug attribute.
> > > > >
> > > > > > log4j: reset attribute= "false".
> > > > >
> > > > > > log4j: Threshold ="null".
> > > > >
> > > > > > log4j: Level value for root is  [debug].
> > > > >
> > > > > > log4j: root level set to DEBUG
> > > > >
> > > > > > log4j: Class name: [org.apache.log4j.ConsoleAppender]
> > > > >
> > > > > > log4j: Parsing layout of class:
> "org.apache.log4j.PatternLayout"
> > > > >
> > > > > > log4j: Setting property [conversionPattern] to [[%d{ISO8601}
> %t
> > > %c]
> > > > >
> > > > > > %m%n].
> > > > >
> > > > > > log4j: Adding appender named [CA] to category [root]
> > > > >
> > > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > >
> > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > >
> > > > > > Sent: Thursday, September 15, 2011 1:54 PM
> > > > >
> > > > > > To: Log4J Users List
> > > > >
> > > > > > Subject: Re: log4j----Edit the event received
> > > > >
> > > > > >
> > > > >
> > > > > > There is a DTD for core elements but alternate elements can be
> > > added
> > > > >
> > > > > > (like
> > > > >
> > > > > > rewritepolicy)...you won't find rewritepolicy in the DTD.
> > > > >
> > > > > >
> > > > >
> > > > > > Can you add -Dlog4j.debug=true to your appender-side java
> > command,
> > > > and
> > > > >
> > > > > > paste
> > > > >
> > > > > > the output?
> > > > >
> > > > > >
> > > > >
> > > > > > Thanks
> > > > >
> > > > > >
> > > > >
> > > > > > Scott
> > > > >
> > > > > >
> > > > >
> > > > > > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
> > > > >
> > > > > > <Ge...@medco.com>wrote:
> > > > >
> > > > > >
> > > > >
> > > > > > > Where can I find XMLschema file for log4j XML configuration
> > > > file????
> > > > >
> > > > > > >
> > > > >
> > > > > > >
> > > > >
> > > > > > > Thank U,
> > > > >
> > > > > > > VGSS
> > > > >
> > > > > > >
> > > > >
> > > > > > > -----Original Message-----
> > > > >
> > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > >
> > > > > > > Sent: Wednesday, September 14, 2011 4:51 PM
> > > > >
> > > > > > > To: Log4J Users List
> > > > >
> > > > > > > Subject: Re: log4j----Edit the event received
> > > > >
> > > > > > >
> > > > >
> > > > > > > Missed the end param on the nested properties param...not
> sure
> > > > about
> > > > >
> > > > > > > case of
> > > > >
> > > > > > > RewritePolicy node name..may be rewritePolicy.
> > > > >
> > > > > > >
> > > > >
> > > > > > > <appender name="rewrite"
> > > > >
> > > > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > > >
> > > > > > >    <appender name="socket"
> > > > >
> > > > > > class="org.apache.log4j.net.SocketAppender">
> > > > >
> > > > > > >      <param name="Port" value="12346"/>
> > > > >
> > > > > > >      <param name="RemoteHost" value="localhost"/>
> > > > >
> > > > > > >      <param name="Application" value="app1"/>
> > > > >
> > > > > > >      <param name="ReconnectionDelay" value="60000"/>
> > > > >
> > > > > > >      <param name="Threshold" value="ALL"/>
> > > > >
> > > > > > >    </appender>
> > > > >
> > > > > > >    <RewritePolicy name="propertyPolicy"
> > > > >
> > > > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > > >
> > > > > > >        <param name="properties"
> > > > >
> > > > > > >
> > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> > > > >
> > > > > > > tyvalue2"/>
> > > > >
> > > > > > >    </RewritePolicy>
> > > > >
> > > > > > > </appender>
> > > > >
> > > > > > >
> > > > >
> > > > > > >
> > > > >
> > > > > > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> > > > >
> > > > > > > <Ge...@medco.com>wrote:
> > > > >
> > > > > > >
> > > > >
> > > > > > > > Thank U...
> > > > >
> > > > > > > >
> > > > >
> > > > > > > > -----Original Message-----
> > > > >
> > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > >
> > > > > > > > Sent: Wednesday, September 14, 2011 4:31 PM
> > > > >
> > > > > > > > To: Log4J Users List
> > > > >
> > > > > > > > Subject: Re: log4j----Edit the event received
> > > > >
> > > > > > > >
> > > > >
> > > > > > > > remoteSourceInfo contains the connected port:
> > > > >
> > > > > > > >
> > > > >
> > > > > > > > hostName = socket.getInetAddress().getHostName();
> > > > >
> > > > > > > > remoteInfo = hostName + ":" + socket.getPort();
> > > > >
> > > > > > > >
> > > > >
> > > > > > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> > > > >
> > > > > > > > <Ge...@medco.com>wrote:
> > > > >
> > > > > > > >
> > > > >
> > > > > > > > > yes, I got them
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > how are "hostname" and " log4j.remoteSourceInfo"
> > different
> > > > from
> > > > >
> > > > > > > each
> > > > >
> > > > > > > > > other....
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > thank U
> > > > >
> > > > > > > > > VGSS
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > -----Original Message-----
> > > > >
> > > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > >
> > > > > > > > > Sent: Wednesday, September 14, 2011 4:15 PM
> > > > >
> > > > > > > > > To: Log4J Users List
> > > > >
> > > > > > > > > Subject: Re: log4j----Edit the event received
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > The SocketReceiver adds two properties to each event:
> > > > >
> > > > > > > > > hostname
> > > > >
> > > > > > > > > log4j.remoteSourceInfo
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > With the developer snapshot of Chainsaw you should see
> > those
> > > > as
> > > > >
> > > > > > > > > individual
> > > > >
> > > > > > > > > columns in the table.  If they aren't displayed by
> default
> > > you
> > > > > can
> > > > >
> > > > > > > > > enable
> > > > >
> > > > > > > > > them via the tab preferences menu (select Columns).
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > Scott
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > > > >
> > > > > > > > > <Ge...@medco.com>wrote:
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > > > Hi,
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >  What I am looking for is, every event received by
> > > > >
> > > > > > SocketAppender,
> > > > >
> > > > > > > > > even
> > > > >
> > > > > > > > > > before it send to remote machine, it must append  to
> the
> > > > >
> > > > > > event(on
> > > > >
> > > > > > > > > which
> > > > >
> > > > > > > > > > log4j is running).
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >  Can any one please tell me a solution for this.
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > > Example: if application(running on machine HOSTNAME)
> > logs
> > > > >
> > > > > > message
> > > > >
> > > > > > > "I
> > > > >
> > > > > > > > > am
> > > > >
> > > > > > > > > > a Logging event", than SOCKET APPENDER must send
> > following
> > > > to
> > > > >
> > > > > > > REMOTE
> > > > >
> > > > > > > > > > machine(or SOCKET RECEIVER on Remote machine should
> > > receive
> > > > >
> > > > > > > > following
> > > > >
> > > > > > > > > as
> > > > >
> > > > > > > > > > log message).
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > > "HOSTNAME:I am a Logging event"
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > > Thank U,
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > > VGSS
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > >
> > > > >
> > > > > >
> > > >
> > **********************************************************************
> > > > >
> > > > > > > > > > This e-mail message and any attachments contain
> > > confidential
> > > > >
> > > > > > > > > information
> > > > >
> > > > > > > > > > from Medco. If you are not the intended recipient, you
> > are
> > > > >
> > > > > > hereby
> > > > >
> > > > > > > > > notified
> > > > >
> > > > > > > > > > that disclosure, printing, copying, distribution, or
> the
> > > > > taking
> > > > >
> > > > > > of
> > > > >
> > > > > > > > any
> > > > >
> > > > > > > > > > action in reliance on the contents of this electronic
> > > > >
> > > > > > information
> > > > >
> > > > > > > is
> > > > >
> > > > > > > > > > strictly prohibited. If you have received this e-mail
> > > > message
> > > > > in
> > > > >
> > > > > > > > > error,
> > > > >
> > > > > > > > > > please immediately notify the sender by reply message
> > and
> > > > then
> > > > >
> > > > > > > > delete
> > > > >
> > > > > > > > > the
> > > > >
> > > > > > > > > > electronic message and any attachments.
> > > > >
> > > > > > > > > >
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > >
> > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > >
> > > > > > > > > This e-mail message and any attachments contain
> > confidential
> > > > >
> > > > > > > > information
> > > > >
> > > > > > > > > from Medco. If you are not the intended recipient, you
> are
> > > > > hereby
> > > > >
> > > > > > > > notified
> > > > >
> > > > > > > > > that disclosure, printing, copying, distribution, or the
> > > > taking
> > > > > of
> > > > >
> > > > > > > any
> > > > >
> > > > > > > > > action in reliance on the contents of this electronic
> > > > > information
> > > > >
> > > > > > is
> > > > >
> > > > > > > > > strictly prohibited. If you have received this e-mail
> > > message
> > > > in
> > > > >
> > > > > > > > error,
> > > > >
> > > > > > > > > please immediately notify the sender by reply message
> and
> > > then
> > > > >
> > > > > > > delete
> > > > >
> > > > > > > > the
> > > > >
> > > > > > > > > electronic message and any attachments.
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > >
> > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > >
> > > > > > > > > To unsubscribe, e-mail:
> > > > > log4j-user-unsubscribe@logging.apache.org
> > > > >
> > > > > > > > > For additional commands, e-mail:
> > > > >
> > > > > > log4j-user-help@logging.apache.org
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > > >
> > > > >
> > > > > > > >
> > > > >
> > > > > > > >
> > > > >
> > > > > >
> > > >
> > **********************************************************************
> > > > >
> > > > > > > > This e-mail message and any attachments contain
> confidential
> > > > >
> > > > > > > information
> > > > >
> > > > > > > > from Medco. If you are not the intended recipient, you are
> > > > hereby
> > > > >
> > > > > > > notified
> > > > >
> > > > > > > > that disclosure, printing, copying, distribution, or the
> > > taking
> > > > of
> > > > >
> > > > > > any
> > > > >
> > > > > > > > action in reliance on the contents of this electronic
> > > > information
> > > > > is
> > > > >
> > > > > > > > strictly prohibited. If you have received this e-mail
> > message
> > > in
> > > > >
> > > > > > > error,
> > > > >
> > > > > > > > please immediately notify the sender by reply message and
> > then
> > > > >
> > > > > > delete
> > > > >
> > > > > > > the
> > > > >
> > > > > > > > electronic message and any attachments.
> > > > >
> > > > > > > >
> > > > >
> > > > > > > >
> > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > >
> > > > > > > > To unsubscribe, e-mail:
> > > > log4j-user-unsubscribe@logging.apache.org
> > > > >
> > > > > > > > For additional commands, e-mail:
> > > > > log4j-user-help@logging.apache.org
> > > > >
> > > > > > > >
> > > > >
> > > > > > > >
> > > > >
> > > > > > >
> > > > >
> > > > > > >
> > > > >
> > >
> **********************************************************************
> > > > >
> > > > > > > This e-mail message and any attachments contain confidential
> > > > >
> > > > > > information
> > > > >
> > > > > > > from Medco. If you are not the intended recipient, you are
> > > hereby
> > > > >
> > > > > > notified
> > > > >
> > > > > > > that disclosure, printing, copying, distribution, or the
> > taking
> > > of
> > > > > any
> > > > >
> > > > > > > action in reliance on the contents of this electronic
> > > information
> > > > is
> > > > >
> > > > > > > strictly prohibited. If you have received this e-mail
> message
> > in
> > > > >
> > > > > > error,
> > > > >
> > > > > > > please immediately notify the sender by reply message and
> then
> > > > > delete
> > > > >
> > > > > > the
> > > > >
> > > > > > > electronic message and any attachments.
> > > > >
> > > > > > >
> > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > >
> > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > > >
> > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > > >
> > > > > > >
> > > > >
> > > > > > >
> > > > >
> > > > > >
> > > > >
> > > > > >
> > > >
> > **********************************************************************
> > > > >
> > > > > > This e-mail message and any attachments contain confidential
> > > > > information
> > > > >
> > > > > > from Medco. If you are not the intended recipient, you are
> > hereby
> > > > >
> > > > > > notified that disclosure, printing, copying, distribution, or
> > the
> > > > > taking
> > > > >
> > > > > > of any action in reliance on the contents of this electronic
> > > > > information
> > > > >
> > > > > > is strictly prohibited. If you have received this e-mail
> message
> > > in
> > > > >
> > > > > > error, please immediately notify the sender by reply message
> and
> > > > then
> > > > >
> > > > > > delete the electronic message and any attachments.
> > > > >
> > > > > >
> > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > >
> > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> > > > >
> > > > > > For additional commands, e-mail:
> > > log4j-user-help@logging.apache.org
> > > > >
> > > > > >
> > > > >
> > > > > >
> > > >
> > **********************************************************************
> > > > >
> > > > > > This e-mail message and any attachments contain confidential
> > > > > information
> > > > >
> > > > > > from Medco. If you are not the intended recipient, you are
> > hereby
> > > > > notified
> > > > >
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
> > of
> > > > any
> > > > >
> > > > > > action in reliance on the contents of this electronic
> > information
> > > is
> > > > >
> > > > > > strictly prohibited. If you have received this e-mail message
> in
> > > > > error,
> > > > >
> > > > > > please immediately notify the sender by reply message and then
> > > > delete
> > > > > the
> > > > >
> > > > > > electronic message and any attachments.
> > > > >
> > > > > >
> > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > >
> > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> > > > >
> > > > > > For additional commands, e-mail:
> > > log4j-user-help@logging.apache.org
> > > > >
> > > > > >
> > > > >
> > > > > >
> > > > >
> > > > >
> > >
> **********************************************************************
> > > > > This e-mail message and any attachments contain confidential
> > > > information
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > > > notified
> > > > > that disclosure, printing, copying, distribution, or the taking
> of
> > > any
> > > > > action in reliance on the contents of this electronic
> information
> > is
> > > > > strictly prohibited. If you have received this e-mail message in
> > > > error,
> > > > > please immediately notify the sender by reply message and then
> > > delete
> > > > the
> > > > > electronic message and any attachments.
> > > > >
> > > >
> > > >
> > **********************************************************************
> > > > This e-mail message and any attachments contain confidential
> > > information
> > > > from Medco. If you are not the intended recipient, you are hereby
> > > > notified that disclosure, printing, copying, distribution, or the
> > > taking
> > > > of any action in reliance on the contents of this electronic
> > > information
> > > > is strictly prohibited. If you have received this e-mail message
> in
> > > > error, please immediately notify the sender by reply message and
> > then
> > > > delete the electronic message and any attachments.
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > > >
> > > >
> > **********************************************************************
> > > > This e-mail message and any attachments contain confidential
> > > information
> > > > from Medco. If you are not the intended recipient, you are hereby
> > > notified
> > > > that disclosure, printing, copying, distribution, or the taking of
> > any
> > > > action in reliance on the contents of this electronic information
> is
> > > > strictly prohibited. If you have received this e-mail message in
> > > error,
> > > > please immediately notify the sender by reply message and then
> > delete
> > > the
> > > > electronic message and any attachments.
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > > >
> > > >
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> >
> > **********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then delete
> the
> > electronic message and any attachments.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in error,
> please immediately notify the sender by reply message and then delete the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
Yes I did that, if I do that than it complaints about tag
<reWritePolicy> and <plugin>.......

-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Monday, September 19, 2011 1:39 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

Can you try adding these two lines to the top of your config?

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">


Not sure why you're having this problem..

Scott

On Mon, Sep 19, 2011 at 10:19 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

>
>
> I used the config from following link exactly.... I still get
following
> exception
>
> log4j:WARN Continuable parsing error 1 and column 69
> log4j:WARN Document root element "log4j:configuration", must match
> DOCTYPE root "null".
> log4j:WARN Continuable parsing error 1 and column 69
> log4j:WARN Document is invalid: no grammar found.
>
>
>
> It looks like parsing is different in chainsaw application from my
> Application, my classpath is exactly same.....
>
>
> Weird!!!!!
>
> Thank U,
> VGSS
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Monday, September 19, 2011 1:13 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> I haven't seen that issue before...you should be able to use any of
the
> configuration files in the test folder:
>
>
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
>
c/test/resources/org/apache/log4j/rewrite/map.xml?revision=564831&view=m
> arkup
>
> On Mon, Sep 19, 2011 at 9:46 AM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > I used the same log4j.xml I used by chainsaw in my application and
> > exactly same classpath , than I get following exception.
> >
> >
> > log4j:WARN Continuable parsing error 2 and column 82
> > log4j:WARN Document root element "log4j:configuration", must match
> > DOCTYPE root "null".
> > log4j:WARN Continuable parsing error 2 and column 82
> > log4j:WARN Document is invalid: no grammar found.
> >
> >
> > Chainsaw config is.
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> > debug="true">
> >    <plugin class="org.apache.log4j.net.SocketReceiver"
> > name="SocketReceiver-12346">
> >        <param name="active" value="true"/>
> >        <param name="advertiseViaMulticastDNS" value="false"/>
> >        <param name="class" value="class
> > org.apache.log4j.net.SocketReceiver"/>
> >        <param name="connectedSocketDetails" value="[]"/>
> >        <param name="name" value="SocketReceiver-12346"/>
> >        <param name="paused" value="false"/>
> >        <param name="port" value="12346"/>
> >        <param name="threshold" value="TRACE"/>
> >    </plugin>
> >   <appender name="F1" class="org.apache.log4j.FileAppender">
> >        <param name="file" value="c:/LogsDir/file.txt"/>
> >        <param name="append" value="false"/>
> >       <layout class="org.apache.log4j.PatternLayout">
> >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > p2:%X{p2} %m%n"/>
> >       </layout>
> >     </appender>
> >
> >
> >     <appender name="A1"
> > class="org.apache.log4j.rewrite.RewriteAppender">
> >       <appender-ref ref="F1"/>
> >       <rewritePolicy
> > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> >         <param name="properties"
value="p1=Hello,p2=World,x1=3.1415"/>
> >       </rewritePolicy>
> >     </appender>
> >
> >   <root>
> >      <level value="debug"/>
> >       <appender-ref ref="A1" />
> >    </root>
> >
> > </log4j:configuration>
> >
> > This makes me to think that is chainsaw code responsible for making
it
> > to work???????????????????????
> >
> >
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Friday, September 16, 2011 4:03 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > In theory then, you should be able to add the entire chainsaw
> classpath
> > to
> > your application classpath and see it work..yes?
> >
> > On Fri, Sep 16, 2011 at 12:58 PM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > Just adding to last post , I am using log4j1.2.16 which is the one
> > used
> > > by chainsaw application too...
> > >
> > > -----Original Message-----
> > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > Sent: Friday, September 16, 2011 3:26 PM
> > > To: Log4J Users List
> > > Subject: RE: log4j----Edit the event received
> > >
> > > Even for me it is working on chainsaw side.
> > > But if I have this on my application side where I define
> > SocketAppender
> > > , it is not working, I included components ,extras and receivers
> jars.
> > >
> > >
> > > Thank U,
> > > VGSS
> > >
> > > -----Original Message-----
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > Sent: Friday, September 16, 2011 3:03 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j----Edit the event received
> > >
> > > I just tried this and it worked fine....I modified the Chainsaw
> config
> > > file
> > > I was using (anything received by Chainsaw can also be sent to
> > appenders
> > > defined in the same config)...configuration and example log file
> > output
> > > below:
> > >
> > > Here's what I added to the Chainsaw config file:
> > >   <appender name="F1" class="org.apache.log4j.FileAppender">
> > >       <param name="file" value="c:/temp/file.txt"/>
> > >       <param name="append" value="false"/>
> > >       <layout class="org.apache.log4j.PatternLayout">
> > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > p2:%X{p2}
> > > %m%n"/>
> > >       </layout>
> > >     </appender>
> > >
> > >
> > >     <appender name="A1"
> > > class="org.apache.log4j.rewrite.RewriteAppender">
> > >       <appender-ref ref="F1"/>
> > >       <rewritePolicy
> > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > >         <param name="properties"
> value="p1=Hello,p2=World,x1=3.1415"/>
> > >       </rewritePolicy>
> > >     </appender>
> > >
> > >   <root>
> > >      <level value="debug"/>
> > >       <appender-ref ref="A1" />
> > >    </root>
> > >
> > > And here is an example output line:
> > > DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE
RI-
> > > RI.DRI
> > >  FATAL ERROR WARNING INFO
> > >
> > >
> > > On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
> > > <Ge...@medco.com>wrote:
> > >
> > > > I tried this, its not working, following are warnings I get
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > log4j:WARN Continuable parsing error 48 and column 80
> > > >
> > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > >
> > > > log4j:WARN Continuable parsing error 52 and column 14
> > > >
> > > > log4j:WARN The content of element type "appender" must match
> > > >
> > >
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > > ?,layout?,filter*,appender-ref*)".
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Adding an Appender to RewriteAppender is working fine, but
> assigning
> > > > rewritePolicy to a RewriteAppender is failing.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Thank U,
> > > >
> > > > VGSS
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > Sent: Friday, September 16, 2011 1:48 PM
> > > > To: Log4J Users List
> > > > Subject: Re: log4j----Edit the event received
> > > >
> > > >
> > > >
> > > > Here is an example from the tests in log4j:
> > > >
> > > >
> > > >
> > > >
> > >
> >
>
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> > > >
> > >
> >
>
c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> > > > ev=564831
> > > >
> > > >
> > > >
> > > >     <appender name="F1" class="org.apache.log4j.FileAppender">
> > > >
> > > >       <param name="file" value="temp"/>
> > > >
> > > >       <param name="append" value="false"/>
> > > >
> > > >       <layout class="org.apache.log4j.PatternLayout">
> > > >
> > > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > > p2:%X{p2}
> > > >
> > > > %m%n"/>
> > > >
> > > >       </layout>
> > > >
> > > >     </appender>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >     <appender name="A1"
> > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > >
> > > >       <appender-ref ref="F1"/>
> > > >
> > > >       <rewritePolicy
> > > >
> > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > >
> > > >         <param name="properties"
> > value="p1=Hello,p2=World,x1=3.1415"/>
> > > >
> > > >       </rewritePolicy>
> > > >
> > > >     </appender>
> > > >
> > > >
> > > >
> > > >     <root>
> > > >
> > > >       <level value ="debug" />
> > > >
> > > >       <appender-ref ref="A1" />
> > > >
> > > >     </root>
> > > >
> > > >
> > > >
> > > > On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
> > > >
> > > > <Ge...@medco.com>wrote:
> > > >
> > > >
> > > >
> > > > > Would any one please give an example of xml configuration file
> > with
> > > >
> > > > > Rewrite Appender.
> > > >
> > > > >
> > > >
> > > > > Thank U,
> > > >
> > > > > Vgss
> > > >
> > > > >
> > > >
> > > > > -----Original Message-----
> > > >
> > > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > >
> > > > > Sent: Thursday, September 15, 2011 1:57 PM
> > > >
> > > > > To: Log4J Users List
> > > >
> > > > > Subject: RE: log4j----Edit the event received
> > > >
> > > > >
> > > >
> > > > > log4j: Trying to find [server2Rewritelog4j.xml] using context
> > > >
> > > > > classloader sun.misc.Launcher$AppClassLoader@601bb1.
> > > >
> > > > > log4j: Using URL
> > > >
> > > > >
> > [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> > > > for
> > > >
> > > > > automatic log4j configuration.
> > > >
> > > > > log4j: Preferred configurator class:
> > > >
> > > > > org.apache.log4j.xml.DOMConfigurator
> > > >
> > > > > log4j: System property is :null
> > > >
> > > > > log4j: Standard DocumentBuilderFactory search succeded.
> > > >
> > > > > log4j: DocumentBuilderFactory is:
> > > >
> > > > >
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> > > >
> > > > > log4j:WARN Continuable parsing error 19 and column 97
> > > >
> > > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > >
> > > > > log4j:WARN Continuable parsing error 22 and column 12
> > > >
> > > > > log4j:WARN The content of element type "appender" must match
> > > >
> > > > >
> > > >
> > >
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > >
> > > > > ?,layout?,filter*,appender-ref*)".
> > > >
> > > > > log4j: debug attribute= "null".
> > > >
> > > > > log4j: Ignoring debug attribute.
> > > >
> > > > > log4j: reset attribute= "false".
> > > >
> > > > > log4j: Threshold ="null".
> > > >
> > > > > log4j: Level value for root is  [debug].
> > > >
> > > > > log4j: root level set to DEBUG
> > > >
> > > > > log4j: Class name: [org.apache.log4j.ConsoleAppender]
> > > >
> > > > > log4j: Parsing layout of class:
"org.apache.log4j.PatternLayout"
> > > >
> > > > > log4j: Setting property [conversionPattern] to [[%d{ISO8601}
%t
> > %c]
> > > >
> > > > > %m%n].
> > > >
> > > > > log4j: Adding appender named [CA] to category [root]
> > > >
> > > > >
> > > >
> > > > > -----Original Message-----
> > > >
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > >
> > > > > Sent: Thursday, September 15, 2011 1:54 PM
> > > >
> > > > > To: Log4J Users List
> > > >
> > > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > >
> > > >
> > > > > There is a DTD for core elements but alternate elements can be
> > added
> > > >
> > > > > (like
> > > >
> > > > > rewritepolicy)...you won't find rewritepolicy in the DTD.
> > > >
> > > > >
> > > >
> > > > > Can you add -Dlog4j.debug=true to your appender-side java
> command,
> > > and
> > > >
> > > > > paste
> > > >
> > > > > the output?
> > > >
> > > > >
> > > >
> > > > > Thanks
> > > >
> > > > >
> > > >
> > > > > Scott
> > > >
> > > > >
> > > >
> > > > > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
> > > >
> > > > > <Ge...@medco.com>wrote:
> > > >
> > > > >
> > > >
> > > > > > Where can I find XMLschema file for log4j XML configuration
> > > file????
> > > >
> > > > > >
> > > >
> > > > > >
> > > >
> > > > > > Thank U,
> > > >
> > > > > > VGSS
> > > >
> > > > > >
> > > >
> > > > > > -----Original Message-----
> > > >
> > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > >
> > > > > > Sent: Wednesday, September 14, 2011 4:51 PM
> > > >
> > > > > > To: Log4J Users List
> > > >
> > > > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > > >
> > > >
> > > > > > Missed the end param on the nested properties param...not
sure
> > > about
> > > >
> > > > > > case of
> > > >
> > > > > > RewritePolicy node name..may be rewritePolicy.
> > > >
> > > > > >
> > > >
> > > > > > <appender name="rewrite"
> > > >
> > > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > >
> > > > > >    <appender name="socket"
> > > >
> > > > > class="org.apache.log4j.net.SocketAppender">
> > > >
> > > > > >      <param name="Port" value="12346"/>
> > > >
> > > > > >      <param name="RemoteHost" value="localhost"/>
> > > >
> > > > > >      <param name="Application" value="app1"/>
> > > >
> > > > > >      <param name="ReconnectionDelay" value="60000"/>
> > > >
> > > > > >      <param name="Threshold" value="ALL"/>
> > > >
> > > > > >    </appender>
> > > >
> > > > > >    <RewritePolicy name="propertyPolicy"
> > > >
> > > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > >
> > > > > >        <param name="properties"
> > > >
> > > > > >
> > > >
> > > > >
> > > >
> > >
> >
>
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> > > >
> > > > > > tyvalue2"/>
> > > >
> > > > > >    </RewritePolicy>
> > > >
> > > > > > </appender>
> > > >
> > > > > >
> > > >
> > > > > >
> > > >
> > > > > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> > > >
> > > > > > <Ge...@medco.com>wrote:
> > > >
> > > > > >
> > > >
> > > > > > > Thank U...
> > > >
> > > > > > >
> > > >
> > > > > > > -----Original Message-----
> > > >
> > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > >
> > > > > > > Sent: Wednesday, September 14, 2011 4:31 PM
> > > >
> > > > > > > To: Log4J Users List
> > > >
> > > > > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > > > >
> > > >
> > > > > > > remoteSourceInfo contains the connected port:
> > > >
> > > > > > >
> > > >
> > > > > > > hostName = socket.getInetAddress().getHostName();
> > > >
> > > > > > > remoteInfo = hostName + ":" + socket.getPort();
> > > >
> > > > > > >
> > > >
> > > > > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> > > >
> > > > > > > <Ge...@medco.com>wrote:
> > > >
> > > > > > >
> > > >
> > > > > > > > yes, I got them
> > > >
> > > > > > > >
> > > >
> > > > > > > > how are "hostname" and " log4j.remoteSourceInfo"
> different
> > > from
> > > >
> > > > > > each
> > > >
> > > > > > > > other....
> > > >
> > > > > > > >
> > > >
> > > > > > > > thank U
> > > >
> > > > > > > > VGSS
> > > >
> > > > > > > >
> > > >
> > > > > > > >
> > > >
> > > > > > > > -----Original Message-----
> > > >
> > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > >
> > > > > > > > Sent: Wednesday, September 14, 2011 4:15 PM
> > > >
> > > > > > > > To: Log4J Users List
> > > >
> > > > > > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > > > > >
> > > >
> > > > > > > > The SocketReceiver adds two properties to each event:
> > > >
> > > > > > > > hostname
> > > >
> > > > > > > > log4j.remoteSourceInfo
> > > >
> > > > > > > >
> > > >
> > > > > > > > With the developer snapshot of Chainsaw you should see
> those
> > > as
> > > >
> > > > > > > > individual
> > > >
> > > > > > > > columns in the table.  If they aren't displayed by
default
> > you
> > > > can
> > > >
> > > > > > > > enable
> > > >
> > > > > > > > them via the tab preferences menu (select Columns).
> > > >
> > > > > > > >
> > > >
> > > > > > > > Scott
> > > >
> > > > > > > >
> > > >
> > > > > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > > >
> > > > > > > > <Ge...@medco.com>wrote:
> > > >
> > > > > > > >
> > > >
> > > > > > > > > Hi,
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >  What I am looking for is, every event received by
> > > >
> > > > > SocketAppender,
> > > >
> > > > > > > > even
> > > >
> > > > > > > > > before it send to remote machine, it must append  to
the
> > > >
> > > > > event(on
> > > >
> > > > > > > > which
> > > >
> > > > > > > > > log4j is running).
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >  Can any one please tell me a solution for this.
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > > Example: if application(running on machine HOSTNAME)
> logs
> > > >
> > > > > message
> > > >
> > > > > > "I
> > > >
> > > > > > > > am
> > > >
> > > > > > > > > a Logging event", than SOCKET APPENDER must send
> following
> > > to
> > > >
> > > > > > REMOTE
> > > >
> > > > > > > > > machine(or SOCKET RECEIVER on Remote machine should
> > receive
> > > >
> > > > > > > following
> > > >
> > > > > > > > as
> > > >
> > > > > > > > > log message).
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > > "HOSTNAME:I am a Logging event"
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > > Thank U,
> > > >
> > > > > > > > >
> > > >
> > > > > > > > > VGSS
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > >
> > > >
> > > > >
> > >
> **********************************************************************
> > > >
> > > > > > > > > This e-mail message and any attachments contain
> > confidential
> > > >
> > > > > > > > information
> > > >
> > > > > > > > > from Medco. If you are not the intended recipient, you
> are
> > > >
> > > > > hereby
> > > >
> > > > > > > > notified
> > > >
> > > > > > > > > that disclosure, printing, copying, distribution, or
the
> > > > taking
> > > >
> > > > > of
> > > >
> > > > > > > any
> > > >
> > > > > > > > > action in reliance on the contents of this electronic
> > > >
> > > > > information
> > > >
> > > > > > is
> > > >
> > > > > > > > > strictly prohibited. If you have received this e-mail
> > > message
> > > > in
> > > >
> > > > > > > > error,
> > > >
> > > > > > > > > please immediately notify the sender by reply message
> and
> > > then
> > > >
> > > > > > > delete
> > > >
> > > > > > > > the
> > > >
> > > > > > > > > electronic message and any attachments.
> > > >
> > > > > > > > >
> > > >
> > > > > > > >
> > > >
> > > > > > > >
> > > >
> > > > > >
> > > >
> >
**********************************************************************
> > > >
> > > > > > > > This e-mail message and any attachments contain
> confidential
> > > >
> > > > > > > information
> > > >
> > > > > > > > from Medco. If you are not the intended recipient, you
are
> > > > hereby
> > > >
> > > > > > > notified
> > > >
> > > > > > > > that disclosure, printing, copying, distribution, or the
> > > taking
> > > > of
> > > >
> > > > > > any
> > > >
> > > > > > > > action in reliance on the contents of this electronic
> > > > information
> > > >
> > > > > is
> > > >
> > > > > > > > strictly prohibited. If you have received this e-mail
> > message
> > > in
> > > >
> > > > > > > error,
> > > >
> > > > > > > > please immediately notify the sender by reply message
and
> > then
> > > >
> > > > > > delete
> > > >
> > > > > > > the
> > > >
> > > > > > > > electronic message and any attachments.
> > > >
> > > > > > > >
> > > >
> > > > > > > >
> > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > >
> > > > > > > > To unsubscribe, e-mail:
> > > > log4j-user-unsubscribe@logging.apache.org
> > > >
> > > > > > > > For additional commands, e-mail:
> > > >
> > > > > log4j-user-help@logging.apache.org
> > > >
> > > > > > > >
> > > >
> > > > > > > >
> > > >
> > > > > > >
> > > >
> > > > > > >
> > > >
> > > > >
> > >
> **********************************************************************
> > > >
> > > > > > > This e-mail message and any attachments contain
confidential
> > > >
> > > > > > information
> > > >
> > > > > > > from Medco. If you are not the intended recipient, you are
> > > hereby
> > > >
> > > > > > notified
> > > >
> > > > > > > that disclosure, printing, copying, distribution, or the
> > taking
> > > of
> > > >
> > > > > any
> > > >
> > > > > > > action in reliance on the contents of this electronic
> > > information
> > > > is
> > > >
> > > > > > > strictly prohibited. If you have received this e-mail
> message
> > in
> > > >
> > > > > > error,
> > > >
> > > > > > > please immediately notify the sender by reply message and
> then
> > > >
> > > > > delete
> > > >
> > > > > > the
> > > >
> > > > > > > electronic message and any attachments.
> > > >
> > > > > > >
> > > >
> > > > > > >
> > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > >
> > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > >
> > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > >
> > > > > > >
> > > >
> > > > > > >
> > > >
> > > > > >
> > > >
> > > > > >
> > > >
> >
**********************************************************************
> > > >
> > > > > > This e-mail message and any attachments contain confidential
> > > >
> > > > > information
> > > >
> > > > > > from Medco. If you are not the intended recipient, you are
> > hereby
> > > >
> > > > > notified
> > > >
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
> > of
> > > > any
> > > >
> > > > > > action in reliance on the contents of this electronic
> > information
> > > is
> > > >
> > > > > > strictly prohibited. If you have received this e-mail
message
> in
> > > >
> > > > > error,
> > > >
> > > > > > please immediately notify the sender by reply message and
then
> > > > delete
> > > >
> > > > > the
> > > >
> > > > > > electronic message and any attachments.
> > > >
> > > > > >
> > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > >
> > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> > > >
> > > > > > For additional commands, e-mail:
> > > log4j-user-help@logging.apache.org
> > > >
> > > > > >
> > > >
> > > > > >
> > > >
> > > > >
> > > >
> > > > >
> > >
> **********************************************************************
> > > >
> > > > > This e-mail message and any attachments contain confidential
> > > > information
> > > >
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > > >
> > > > > notified that disclosure, printing, copying, distribution, or
> the
> > > > taking
> > > >
> > > > > of any action in reliance on the contents of this electronic
> > > > information
> > > >
> > > > > is strictly prohibited. If you have received this e-mail
message
> > in
> > > >
> > > > > error, please immediately notify the sender by reply message
and
> > > then
> > > >
> > > > > delete the electronic message and any attachments.
> > > >
> > > > >
> > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > >
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > >
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > >
> > > > >
> > > >
> > > > >
> > >
> **********************************************************************
> > > >
> > > > > This e-mail message and any attachments contain confidential
> > > > information
> > > >
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > > > notified
> > > >
> > > > > that disclosure, printing, copying, distribution, or the
taking
> of
> > > any
> > > >
> > > > > action in reliance on the contents of this electronic
> information
> > is
> > > >
> > > > > strictly prohibited. If you have received this e-mail message
in
> > > > error,
> > > >
> > > > > please immediately notify the sender by reply message and then
> > > delete
> > > > the
> > > >
> > > > > electronic message and any attachments.
> > > >
> > > > >
> > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > >
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > >
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > >
> > > > >
> > > >
> > > > >
> > > >
> > > >
> >
**********************************************************************
> > > > This e-mail message and any attachments contain confidential
> > > information
> > > > from Medco. If you are not the intended recipient, you are
hereby
> > > notified
> > > > that disclosure, printing, copying, distribution, or the taking
of
> > any
> > > > action in reliance on the contents of this electronic
information
> is
> > > > strictly prohibited. If you have received this e-mail message in
> > > error,
> > > > please immediately notify the sender by reply message and then
> > delete
> > > the
> > > > electronic message and any attachments.
> > > >
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > > notified that disclosure, printing, copying, distribution, or the
> > taking
> > > of any action in reliance on the contents of this electronic
> > information
> > > is strictly prohibited. If you have received this e-mail message
in
> > > error, please immediately notify the sender by reply message and
> then
> > > delete the electronic message and any attachments.
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail:
log4j-user-help@logging.apache.org
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information
is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail:
log4j-user-help@logging.apache.org
> > >
> > >
> >
> >
**********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of
any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then
delete
> the
> > electronic message and any attachments.
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


Re: log4j----Edit the event received

Posted by Scott Deboy <sc...@gmail.com>.
Can you try adding these two lines to the top of your config?

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">


Not sure why you're having this problem..

Scott

On Mon, Sep 19, 2011 at 10:19 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

>
>
> I used the config from following link exactly.... I still get following
> exception
>
> log4j:WARN Continuable parsing error 1 and column 69
> log4j:WARN Document root element "log4j:configuration", must match
> DOCTYPE root "null".
> log4j:WARN Continuable parsing error 1 and column 69
> log4j:WARN Document is invalid: no grammar found.
>
>
>
> It looks like parsing is different in chainsaw application from my
> Application, my classpath is exactly same.....
>
>
> Weird!!!!!
>
> Thank U,
> VGSS
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Monday, September 19, 2011 1:13 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> I haven't seen that issue before...you should be able to use any of the
> configuration files in the test folder:
>
> http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> c/test/resources/org/apache/log4j/rewrite/map.xml?revision=564831&view=m
> arkup
>
> On Mon, Sep 19, 2011 at 9:46 AM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > I used the same log4j.xml I used by chainsaw in my application and
> > exactly same classpath , than I get following exception.
> >
> >
> > log4j:WARN Continuable parsing error 2 and column 82
> > log4j:WARN Document root element "log4j:configuration", must match
> > DOCTYPE root "null".
> > log4j:WARN Continuable parsing error 2 and column 82
> > log4j:WARN Document is invalid: no grammar found.
> >
> >
> > Chainsaw config is.
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> > debug="true">
> >    <plugin class="org.apache.log4j.net.SocketReceiver"
> > name="SocketReceiver-12346">
> >        <param name="active" value="true"/>
> >        <param name="advertiseViaMulticastDNS" value="false"/>
> >        <param name="class" value="class
> > org.apache.log4j.net.SocketReceiver"/>
> >        <param name="connectedSocketDetails" value="[]"/>
> >        <param name="name" value="SocketReceiver-12346"/>
> >        <param name="paused" value="false"/>
> >        <param name="port" value="12346"/>
> >        <param name="threshold" value="TRACE"/>
> >    </plugin>
> >   <appender name="F1" class="org.apache.log4j.FileAppender">
> >        <param name="file" value="c:/LogsDir/file.txt"/>
> >        <param name="append" value="false"/>
> >       <layout class="org.apache.log4j.PatternLayout">
> >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > p2:%X{p2} %m%n"/>
> >       </layout>
> >     </appender>
> >
> >
> >     <appender name="A1"
> > class="org.apache.log4j.rewrite.RewriteAppender">
> >       <appender-ref ref="F1"/>
> >       <rewritePolicy
> > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> >         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
> >       </rewritePolicy>
> >     </appender>
> >
> >   <root>
> >      <level value="debug"/>
> >       <appender-ref ref="A1" />
> >    </root>
> >
> > </log4j:configuration>
> >
> > This makes me to think that is chainsaw code responsible for making it
> > to work???????????????????????
> >
> >
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Friday, September 16, 2011 4:03 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > In theory then, you should be able to add the entire chainsaw
> classpath
> > to
> > your application classpath and see it work..yes?
> >
> > On Fri, Sep 16, 2011 at 12:58 PM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > Just adding to last post , I am using log4j1.2.16 which is the one
> > used
> > > by chainsaw application too...
> > >
> > > -----Original Message-----
> > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > Sent: Friday, September 16, 2011 3:26 PM
> > > To: Log4J Users List
> > > Subject: RE: log4j----Edit the event received
> > >
> > > Even for me it is working on chainsaw side.
> > > But if I have this on my application side where I define
> > SocketAppender
> > > , it is not working, I included components ,extras and receivers
> jars.
> > >
> > >
> > > Thank U,
> > > VGSS
> > >
> > > -----Original Message-----
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > Sent: Friday, September 16, 2011 3:03 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j----Edit the event received
> > >
> > > I just tried this and it worked fine....I modified the Chainsaw
> config
> > > file
> > > I was using (anything received by Chainsaw can also be sent to
> > appenders
> > > defined in the same config)...configuration and example log file
> > output
> > > below:
> > >
> > > Here's what I added to the Chainsaw config file:
> > >   <appender name="F1" class="org.apache.log4j.FileAppender">
> > >       <param name="file" value="c:/temp/file.txt"/>
> > >       <param name="append" value="false"/>
> > >       <layout class="org.apache.log4j.PatternLayout">
> > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > p2:%X{p2}
> > > %m%n"/>
> > >       </layout>
> > >     </appender>
> > >
> > >
> > >     <appender name="A1"
> > > class="org.apache.log4j.rewrite.RewriteAppender">
> > >       <appender-ref ref="F1"/>
> > >       <rewritePolicy
> > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > >         <param name="properties"
> value="p1=Hello,p2=World,x1=3.1415"/>
> > >       </rewritePolicy>
> > >     </appender>
> > >
> > >   <root>
> > >      <level value="debug"/>
> > >       <appender-ref ref="A1" />
> > >    </root>
> > >
> > > And here is an example output line:
> > > DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE   RI-
> > > RI.DRI
> > >  FATAL ERROR WARNING INFO
> > >
> > >
> > > On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
> > > <Ge...@medco.com>wrote:
> > >
> > > > I tried this, its not working, following are warnings I get
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > log4j:WARN Continuable parsing error 48 and column 80
> > > >
> > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > >
> > > > log4j:WARN Continuable parsing error 52 and column 14
> > > >
> > > > log4j:WARN The content of element type "appender" must match
> > > >
> > >
> >
> "(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > > ?,layout?,filter*,appender-ref*)".
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Adding an Appender to RewriteAppender is working fine, but
> assigning
> > > > rewritePolicy to a RewriteAppender is failing.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Thank U,
> > > >
> > > > VGSS
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > Sent: Friday, September 16, 2011 1:48 PM
> > > > To: Log4J Users List
> > > > Subject: Re: log4j----Edit the event received
> > > >
> > > >
> > > >
> > > > Here is an example from the tests in log4j:
> > > >
> > > >
> > > >
> > > >
> > >
> >
> http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> > > >
> > >
> >
> c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> > > > ev=564831
> > > >
> > > >
> > > >
> > > >     <appender name="F1" class="org.apache.log4j.FileAppender">
> > > >
> > > >       <param name="file" value="temp"/>
> > > >
> > > >       <param name="append" value="false"/>
> > > >
> > > >       <layout class="org.apache.log4j.PatternLayout">
> > > >
> > > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > > p2:%X{p2}
> > > >
> > > > %m%n"/>
> > > >
> > > >       </layout>
> > > >
> > > >     </appender>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >     <appender name="A1"
> > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > >
> > > >       <appender-ref ref="F1"/>
> > > >
> > > >       <rewritePolicy
> > > >
> > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > >
> > > >         <param name="properties"
> > value="p1=Hello,p2=World,x1=3.1415"/>
> > > >
> > > >       </rewritePolicy>
> > > >
> > > >     </appender>
> > > >
> > > >
> > > >
> > > >     <root>
> > > >
> > > >       <level value ="debug" />
> > > >
> > > >       <appender-ref ref="A1" />
> > > >
> > > >     </root>
> > > >
> > > >
> > > >
> > > > On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
> > > >
> > > > <Ge...@medco.com>wrote:
> > > >
> > > >
> > > >
> > > > > Would any one please give an example of xml configuration file
> > with
> > > >
> > > > > Rewrite Appender.
> > > >
> > > > >
> > > >
> > > > > Thank U,
> > > >
> > > > > Vgss
> > > >
> > > > >
> > > >
> > > > > -----Original Message-----
> > > >
> > > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > > >
> > > > > Sent: Thursday, September 15, 2011 1:57 PM
> > > >
> > > > > To: Log4J Users List
> > > >
> > > > > Subject: RE: log4j----Edit the event received
> > > >
> > > > >
> > > >
> > > > > log4j: Trying to find [server2Rewritelog4j.xml] using context
> > > >
> > > > > classloader sun.misc.Launcher$AppClassLoader@601bb1.
> > > >
> > > > > log4j: Using URL
> > > >
> > > > >
> > [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> > > > for
> > > >
> > > > > automatic log4j configuration.
> > > >
> > > > > log4j: Preferred configurator class:
> > > >
> > > > > org.apache.log4j.xml.DOMConfigurator
> > > >
> > > > > log4j: System property is :null
> > > >
> > > > > log4j: Standard DocumentBuilderFactory search succeded.
> > > >
> > > > > log4j: DocumentBuilderFactory is:
> > > >
> > > > >
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> > > >
> > > > > log4j:WARN Continuable parsing error 19 and column 97
> > > >
> > > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > > >
> > > > > log4j:WARN Continuable parsing error 22 and column 12
> > > >
> > > > > log4j:WARN The content of element type "appender" must match
> > > >
> > > > >
> > > >
> > >
> >
> "(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > >
> > > > > ?,layout?,filter*,appender-ref*)".
> > > >
> > > > > log4j: debug attribute= "null".
> > > >
> > > > > log4j: Ignoring debug attribute.
> > > >
> > > > > log4j: reset attribute= "false".
> > > >
> > > > > log4j: Threshold ="null".
> > > >
> > > > > log4j: Level value for root is  [debug].
> > > >
> > > > > log4j: root level set to DEBUG
> > > >
> > > > > log4j: Class name: [org.apache.log4j.ConsoleAppender]
> > > >
> > > > > log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
> > > >
> > > > > log4j: Setting property [conversionPattern] to [[%d{ISO8601} %t
> > %c]
> > > >
> > > > > %m%n].
> > > >
> > > > > log4j: Adding appender named [CA] to category [root]
> > > >
> > > > >
> > > >
> > > > > -----Original Message-----
> > > >
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > >
> > > > > Sent: Thursday, September 15, 2011 1:54 PM
> > > >
> > > > > To: Log4J Users List
> > > >
> > > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > >
> > > >
> > > > > There is a DTD for core elements but alternate elements can be
> > added
> > > >
> > > > > (like
> > > >
> > > > > rewritepolicy)...you won't find rewritepolicy in the DTD.
> > > >
> > > > >
> > > >
> > > > > Can you add -Dlog4j.debug=true to your appender-side java
> command,
> > > and
> > > >
> > > > > paste
> > > >
> > > > > the output?
> > > >
> > > > >
> > > >
> > > > > Thanks
> > > >
> > > > >
> > > >
> > > > > Scott
> > > >
> > > > >
> > > >
> > > > > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
> > > >
> > > > > <Ge...@medco.com>wrote:
> > > >
> > > > >
> > > >
> > > > > > Where can I find XMLschema file for log4j XML configuration
> > > file????
> > > >
> > > > > >
> > > >
> > > > > >
> > > >
> > > > > > Thank U,
> > > >
> > > > > > VGSS
> > > >
> > > > > >
> > > >
> > > > > > -----Original Message-----
> > > >
> > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > >
> > > > > > Sent: Wednesday, September 14, 2011 4:51 PM
> > > >
> > > > > > To: Log4J Users List
> > > >
> > > > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > > >
> > > >
> > > > > > Missed the end param on the nested properties param...not sure
> > > about
> > > >
> > > > > > case of
> > > >
> > > > > > RewritePolicy node name..may be rewritePolicy.
> > > >
> > > > > >
> > > >
> > > > > > <appender name="rewrite"
> > > >
> > > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > > >
> > > > > >    <appender name="socket"
> > > >
> > > > > class="org.apache.log4j.net.SocketAppender">
> > > >
> > > > > >      <param name="Port" value="12346"/>
> > > >
> > > > > >      <param name="RemoteHost" value="localhost"/>
> > > >
> > > > > >      <param name="Application" value="app1"/>
> > > >
> > > > > >      <param name="ReconnectionDelay" value="60000"/>
> > > >
> > > > > >      <param name="Threshold" value="ALL"/>
> > > >
> > > > > >    </appender>
> > > >
> > > > > >    <RewritePolicy name="propertyPolicy"
> > > >
> > > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > > >
> > > > > >        <param name="properties"
> > > >
> > > > > >
> > > >
> > > > >
> > > >
> > >
> >
> value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> > > >
> > > > > > tyvalue2"/>
> > > >
> > > > > >    </RewritePolicy>
> > > >
> > > > > > </appender>
> > > >
> > > > > >
> > > >
> > > > > >
> > > >
> > > > > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> > > >
> > > > > > <Ge...@medco.com>wrote:
> > > >
> > > > > >
> > > >
> > > > > > > Thank U...
> > > >
> > > > > > >
> > > >
> > > > > > > -----Original Message-----
> > > >
> > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > >
> > > > > > > Sent: Wednesday, September 14, 2011 4:31 PM
> > > >
> > > > > > > To: Log4J Users List
> > > >
> > > > > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > > > >
> > > >
> > > > > > > remoteSourceInfo contains the connected port:
> > > >
> > > > > > >
> > > >
> > > > > > > hostName = socket.getInetAddress().getHostName();
> > > >
> > > > > > > remoteInfo = hostName + ":" + socket.getPort();
> > > >
> > > > > > >
> > > >
> > > > > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> > > >
> > > > > > > <Ge...@medco.com>wrote:
> > > >
> > > > > > >
> > > >
> > > > > > > > yes, I got them
> > > >
> > > > > > > >
> > > >
> > > > > > > > how are "hostname" and " log4j.remoteSourceInfo"
> different
> > > from
> > > >
> > > > > > each
> > > >
> > > > > > > > other....
> > > >
> > > > > > > >
> > > >
> > > > > > > > thank U
> > > >
> > > > > > > > VGSS
> > > >
> > > > > > > >
> > > >
> > > > > > > >
> > > >
> > > > > > > > -----Original Message-----
> > > >
> > > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > >
> > > > > > > > Sent: Wednesday, September 14, 2011 4:15 PM
> > > >
> > > > > > > > To: Log4J Users List
> > > >
> > > > > > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > > > > >
> > > >
> > > > > > > > The SocketReceiver adds two properties to each event:
> > > >
> > > > > > > > hostname
> > > >
> > > > > > > > log4j.remoteSourceInfo
> > > >
> > > > > > > >
> > > >
> > > > > > > > With the developer snapshot of Chainsaw you should see
> those
> > > as
> > > >
> > > > > > > > individual
> > > >
> > > > > > > > columns in the table.  If they aren't displayed by default
> > you
> > > > can
> > > >
> > > > > > > > enable
> > > >
> > > > > > > > them via the tab preferences menu (select Columns).
> > > >
> > > > > > > >
> > > >
> > > > > > > > Scott
> > > >
> > > > > > > >
> > > >
> > > > > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > > >
> > > > > > > > <Ge...@medco.com>wrote:
> > > >
> > > > > > > >
> > > >
> > > > > > > > > Hi,
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >  What I am looking for is, every event received by
> > > >
> > > > > SocketAppender,
> > > >
> > > > > > > > even
> > > >
> > > > > > > > > before it send to remote machine, it must append  to the
> > > >
> > > > > event(on
> > > >
> > > > > > > > which
> > > >
> > > > > > > > > log4j is running).
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >  Can any one please tell me a solution for this.
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > > Example: if application(running on machine HOSTNAME)
> logs
> > > >
> > > > > message
> > > >
> > > > > > "I
> > > >
> > > > > > > > am
> > > >
> > > > > > > > > a Logging event", than SOCKET APPENDER must send
> following
> > > to
> > > >
> > > > > > REMOTE
> > > >
> > > > > > > > > machine(or SOCKET RECEIVER on Remote machine should
> > receive
> > > >
> > > > > > > following
> > > >
> > > > > > > > as
> > > >
> > > > > > > > > log message).
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > > "HOSTNAME:I am a Logging event"
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > > > > Thank U,
> > > >
> > > > > > > > >
> > > >
> > > > > > > > > VGSS
> > > >
> > > > > > > > >
> > > >
> > > > > > > > >
> > > >
> > > > > > >
> > > >
> > > > >
> > >
> **********************************************************************
> > > >
> > > > > > > > > This e-mail message and any attachments contain
> > confidential
> > > >
> > > > > > > > information
> > > >
> > > > > > > > > from Medco. If you are not the intended recipient, you
> are
> > > >
> > > > > hereby
> > > >
> > > > > > > > notified
> > > >
> > > > > > > > > that disclosure, printing, copying, distribution, or the
> > > > taking
> > > >
> > > > > of
> > > >
> > > > > > > any
> > > >
> > > > > > > > > action in reliance on the contents of this electronic
> > > >
> > > > > information
> > > >
> > > > > > is
> > > >
> > > > > > > > > strictly prohibited. If you have received this e-mail
> > > message
> > > > in
> > > >
> > > > > > > > error,
> > > >
> > > > > > > > > please immediately notify the sender by reply message
> and
> > > then
> > > >
> > > > > > > delete
> > > >
> > > > > > > > the
> > > >
> > > > > > > > > electronic message and any attachments.
> > > >
> > > > > > > > >
> > > >
> > > > > > > >
> > > >
> > > > > > > >
> > > >
> > > > > >
> > > >
> > **********************************************************************
> > > >
> > > > > > > > This e-mail message and any attachments contain
> confidential
> > > >
> > > > > > > information
> > > >
> > > > > > > > from Medco. If you are not the intended recipient, you are
> > > > hereby
> > > >
> > > > > > > notified
> > > >
> > > > > > > > that disclosure, printing, copying, distribution, or the
> > > taking
> > > > of
> > > >
> > > > > > any
> > > >
> > > > > > > > action in reliance on the contents of this electronic
> > > > information
> > > >
> > > > > is
> > > >
> > > > > > > > strictly prohibited. If you have received this e-mail
> > message
> > > in
> > > >
> > > > > > > error,
> > > >
> > > > > > > > please immediately notify the sender by reply message and
> > then
> > > >
> > > > > > delete
> > > >
> > > > > > > the
> > > >
> > > > > > > > electronic message and any attachments.
> > > >
> > > > > > > >
> > > >
> > > > > > > >
> > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > >
> > > > > > > > To unsubscribe, e-mail:
> > > > log4j-user-unsubscribe@logging.apache.org
> > > >
> > > > > > > > For additional commands, e-mail:
> > > >
> > > > > log4j-user-help@logging.apache.org
> > > >
> > > > > > > >
> > > >
> > > > > > > >
> > > >
> > > > > > >
> > > >
> > > > > > >
> > > >
> > > > >
> > >
> **********************************************************************
> > > >
> > > > > > > This e-mail message and any attachments contain confidential
> > > >
> > > > > > information
> > > >
> > > > > > > from Medco. If you are not the intended recipient, you are
> > > hereby
> > > >
> > > > > > notified
> > > >
> > > > > > > that disclosure, printing, copying, distribution, or the
> > taking
> > > of
> > > >
> > > > > any
> > > >
> > > > > > > action in reliance on the contents of this electronic
> > > information
> > > > is
> > > >
> > > > > > > strictly prohibited. If you have received this e-mail
> message
> > in
> > > >
> > > > > > error,
> > > >
> > > > > > > please immediately notify the sender by reply message and
> then
> > > >
> > > > > delete
> > > >
> > > > > > the
> > > >
> > > > > > > electronic message and any attachments.
> > > >
> > > > > > >
> > > >
> > > > > > >
> > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > >
> > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > > >
> > > > > > > For additional commands, e-mail:
> > > > log4j-user-help@logging.apache.org
> > > >
> > > > > > >
> > > >
> > > > > > >
> > > >
> > > > > >
> > > >
> > > > > >
> > > >
> > **********************************************************************
> > > >
> > > > > > This e-mail message and any attachments contain confidential
> > > >
> > > > > information
> > > >
> > > > > > from Medco. If you are not the intended recipient, you are
> > hereby
> > > >
> > > > > notified
> > > >
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
> > of
> > > > any
> > > >
> > > > > > action in reliance on the contents of this electronic
> > information
> > > is
> > > >
> > > > > > strictly prohibited. If you have received this e-mail message
> in
> > > >
> > > > > error,
> > > >
> > > > > > please immediately notify the sender by reply message and then
> > > > delete
> > > >
> > > > > the
> > > >
> > > > > > electronic message and any attachments.
> > > >
> > > > > >
> > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > >
> > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> > > >
> > > > > > For additional commands, e-mail:
> > > log4j-user-help@logging.apache.org
> > > >
> > > > > >
> > > >
> > > > > >
> > > >
> > > > >
> > > >
> > > > >
> > >
> **********************************************************************
> > > >
> > > > > This e-mail message and any attachments contain confidential
> > > > information
> > > >
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > > >
> > > > > notified that disclosure, printing, copying, distribution, or
> the
> > > > taking
> > > >
> > > > > of any action in reliance on the contents of this electronic
> > > > information
> > > >
> > > > > is strictly prohibited. If you have received this e-mail message
> > in
> > > >
> > > > > error, please immediately notify the sender by reply message and
> > > then
> > > >
> > > > > delete the electronic message and any attachments.
> > > >
> > > > >
> > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > >
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > >
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > >
> > > > >
> > > >
> > > > >
> > >
> **********************************************************************
> > > >
> > > > > This e-mail message and any attachments contain confidential
> > > > information
> > > >
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > > > notified
> > > >
> > > > > that disclosure, printing, copying, distribution, or the taking
> of
> > > any
> > > >
> > > > > action in reliance on the contents of this electronic
> information
> > is
> > > >
> > > > > strictly prohibited. If you have received this e-mail message in
> > > > error,
> > > >
> > > > > please immediately notify the sender by reply message and then
> > > delete
> > > > the
> > > >
> > > > > electronic message and any attachments.
> > > >
> > > > >
> > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > >
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > > >
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > > >
> > > > >
> > > >
> > > > >
> > > >
> > > >
> > **********************************************************************
> > > > This e-mail message and any attachments contain confidential
> > > information
> > > > from Medco. If you are not the intended recipient, you are hereby
> > > notified
> > > > that disclosure, printing, copying, distribution, or the taking of
> > any
> > > > action in reliance on the contents of this electronic information
> is
> > > > strictly prohibited. If you have received this e-mail message in
> > > error,
> > > > please immediately notify the sender by reply message and then
> > delete
> > > the
> > > > electronic message and any attachments.
> > > >
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > > notified that disclosure, printing, copying, distribution, or the
> > taking
> > > of any action in reliance on the contents of this electronic
> > information
> > > is strictly prohibited. If you have received this e-mail message in
> > > error, please immediately notify the sender by reply message and
> then
> > > delete the electronic message and any attachments.
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> >
> > **********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then delete
> the
> > electronic message and any attachments.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in error,
> please immediately notify the sender by reply message and then delete the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.

I used the config from following link exactly.... I still get following
exception

log4j:WARN Continuable parsing error 1 and column 69
log4j:WARN Document root element "log4j:configuration", must match
DOCTYPE root "null".
log4j:WARN Continuable parsing error 1 and column 69
log4j:WARN Document is invalid: no grammar found.



It looks like parsing is different in chainsaw application from my
Application, my classpath is exactly same.....


Weird!!!!!

Thank U,
VGSS
-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Monday, September 19, 2011 1:13 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

I haven't seen that issue before...you should be able to use any of the
configuration files in the test folder:

http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
c/test/resources/org/apache/log4j/rewrite/map.xml?revision=564831&view=m
arkup

On Mon, Sep 19, 2011 at 9:46 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

> I used the same log4j.xml I used by chainsaw in my application and
> exactly same classpath , than I get following exception.
>
>
> log4j:WARN Continuable parsing error 2 and column 82
> log4j:WARN Document root element "log4j:configuration", must match
> DOCTYPE root "null".
> log4j:WARN Continuable parsing error 2 and column 82
> log4j:WARN Document is invalid: no grammar found.
>
>
> Chainsaw config is.
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> debug="true">
>    <plugin class="org.apache.log4j.net.SocketReceiver"
> name="SocketReceiver-12346">
>        <param name="active" value="true"/>
>        <param name="advertiseViaMulticastDNS" value="false"/>
>        <param name="class" value="class
> org.apache.log4j.net.SocketReceiver"/>
>        <param name="connectedSocketDetails" value="[]"/>
>        <param name="name" value="SocketReceiver-12346"/>
>        <param name="paused" value="false"/>
>        <param name="port" value="12346"/>
>        <param name="threshold" value="TRACE"/>
>    </plugin>
>   <appender name="F1" class="org.apache.log4j.FileAppender">
>        <param name="file" value="c:/LogsDir/file.txt"/>
>        <param name="append" value="false"/>
>       <layout class="org.apache.log4j.PatternLayout">
>         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> p2:%X{p2} %m%n"/>
>       </layout>
>     </appender>
>
>
>     <appender name="A1"
> class="org.apache.log4j.rewrite.RewriteAppender">
>       <appender-ref ref="F1"/>
>       <rewritePolicy
> class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
>       </rewritePolicy>
>     </appender>
>
>   <root>
>      <level value="debug"/>
>       <appender-ref ref="A1" />
>    </root>
>
> </log4j:configuration>
>
> This makes me to think that is chainsaw code responsible for making it
> to work???????????????????????
>
>
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Friday, September 16, 2011 4:03 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> In theory then, you should be able to add the entire chainsaw
classpath
> to
> your application classpath and see it work..yes?
>
> On Fri, Sep 16, 2011 at 12:58 PM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > Just adding to last post , I am using log4j1.2.16 which is the one
> used
> > by chainsaw application too...
> >
> > -----Original Message-----
> > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > Sent: Friday, September 16, 2011 3:26 PM
> > To: Log4J Users List
> > Subject: RE: log4j----Edit the event received
> >
> > Even for me it is working on chainsaw side.
> > But if I have this on my application side where I define
> SocketAppender
> > , it is not working, I included components ,extras and receivers
jars.
> >
> >
> > Thank U,
> > VGSS
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Friday, September 16, 2011 3:03 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > I just tried this and it worked fine....I modified the Chainsaw
config
> > file
> > I was using (anything received by Chainsaw can also be sent to
> appenders
> > defined in the same config)...configuration and example log file
> output
> > below:
> >
> > Here's what I added to the Chainsaw config file:
> >   <appender name="F1" class="org.apache.log4j.FileAppender">
> >       <param name="file" value="c:/temp/file.txt"/>
> >       <param name="append" value="false"/>
> >       <layout class="org.apache.log4j.PatternLayout">
> >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > p2:%X{p2}
> > %m%n"/>
> >       </layout>
> >     </appender>
> >
> >
> >     <appender name="A1"
> > class="org.apache.log4j.rewrite.RewriteAppender">
> >       <appender-ref ref="F1"/>
> >       <rewritePolicy
> > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> >         <param name="properties"
value="p1=Hello,p2=World,x1=3.1415"/>
> >       </rewritePolicy>
> >     </appender>
> >
> >   <root>
> >      <level value="debug"/>
> >       <appender-ref ref="A1" />
> >    </root>
> >
> > And here is an example output line:
> > DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE   RI-
> > RI.DRI
> >  FATAL ERROR WARNING INFO
> >
> >
> > On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > I tried this, its not working, following are warnings I get
> > >
> > >
> > >
> > >
> > >
> > > log4j:WARN Continuable parsing error 48 and column 80
> > >
> > > log4j:WARN Element type "rewritePolicy" must be declared.
> > >
> > > log4j:WARN Continuable parsing error 52 and column 14
> > >
> > > log4j:WARN The content of element type "appender" must match
> > >
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > ?,layout?,filter*,appender-ref*)".
> > >
> > >
> > >
> > >
> > >
> > > Adding an Appender to RewriteAppender is working fine, but
assigning
> > > rewritePolicy to a RewriteAppender is failing.
> > >
> > >
> > >
> > >
> > >
> > > Thank U,
> > >
> > > VGSS
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > Sent: Friday, September 16, 2011 1:48 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j----Edit the event received
> > >
> > >
> > >
> > > Here is an example from the tests in log4j:
> > >
> > >
> > >
> > >
> >
>
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> > >
> >
>
c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> > > ev=564831
> > >
> > >
> > >
> > >     <appender name="F1" class="org.apache.log4j.FileAppender">
> > >
> > >       <param name="file" value="temp"/>
> > >
> > >       <param name="append" value="false"/>
> > >
> > >       <layout class="org.apache.log4j.PatternLayout">
> > >
> > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > p2:%X{p2}
> > >
> > > %m%n"/>
> > >
> > >       </layout>
> > >
> > >     </appender>
> > >
> > >
> > >
> > >
> > >
> > >     <appender name="A1"
> > > class="org.apache.log4j.rewrite.RewriteAppender">
> > >
> > >       <appender-ref ref="F1"/>
> > >
> > >       <rewritePolicy
> > >
> > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > >
> > >         <param name="properties"
> value="p1=Hello,p2=World,x1=3.1415"/>
> > >
> > >       </rewritePolicy>
> > >
> > >     </appender>
> > >
> > >
> > >
> > >     <root>
> > >
> > >       <level value ="debug" />
> > >
> > >       <appender-ref ref="A1" />
> > >
> > >     </root>
> > >
> > >
> > >
> > > On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
> > >
> > > <Ge...@medco.com>wrote:
> > >
> > >
> > >
> > > > Would any one please give an example of xml configuration file
> with
> > >
> > > > Rewrite Appender.
> > >
> > > >
> > >
> > > > Thank U,
> > >
> > > > Vgss
> > >
> > > >
> > >
> > > > -----Original Message-----
> > >
> > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > >
> > > > Sent: Thursday, September 15, 2011 1:57 PM
> > >
> > > > To: Log4J Users List
> > >
> > > > Subject: RE: log4j----Edit the event received
> > >
> > > >
> > >
> > > > log4j: Trying to find [server2Rewritelog4j.xml] using context
> > >
> > > > classloader sun.misc.Launcher$AppClassLoader@601bb1.
> > >
> > > > log4j: Using URL
> > >
> > > >
> [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> > > for
> > >
> > > > automatic log4j configuration.
> > >
> > > > log4j: Preferred configurator class:
> > >
> > > > org.apache.log4j.xml.DOMConfigurator
> > >
> > > > log4j: System property is :null
> > >
> > > > log4j: Standard DocumentBuilderFactory search succeded.
> > >
> > > > log4j: DocumentBuilderFactory is:
> > >
> > > >
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> > >
> > > > log4j:WARN Continuable parsing error 19 and column 97
> > >
> > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > >
> > > > log4j:WARN Continuable parsing error 22 and column 12
> > >
> > > > log4j:WARN The content of element type "appender" must match
> > >
> > > >
> > >
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > >
> > > > ?,layout?,filter*,appender-ref*)".
> > >
> > > > log4j: debug attribute= "null".
> > >
> > > > log4j: Ignoring debug attribute.
> > >
> > > > log4j: reset attribute= "false".
> > >
> > > > log4j: Threshold ="null".
> > >
> > > > log4j: Level value for root is  [debug].
> > >
> > > > log4j: root level set to DEBUG
> > >
> > > > log4j: Class name: [org.apache.log4j.ConsoleAppender]
> > >
> > > > log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
> > >
> > > > log4j: Setting property [conversionPattern] to [[%d{ISO8601} %t
> %c]
> > >
> > > > %m%n].
> > >
> > > > log4j: Adding appender named [CA] to category [root]
> > >
> > > >
> > >
> > > > -----Original Message-----
> > >
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > >
> > > > Sent: Thursday, September 15, 2011 1:54 PM
> > >
> > > > To: Log4J Users List
> > >
> > > > Subject: Re: log4j----Edit the event received
> > >
> > > >
> > >
> > > > There is a DTD for core elements but alternate elements can be
> added
> > >
> > > > (like
> > >
> > > > rewritepolicy)...you won't find rewritepolicy in the DTD.
> > >
> > > >
> > >
> > > > Can you add -Dlog4j.debug=true to your appender-side java
command,
> > and
> > >
> > > > paste
> > >
> > > > the output?
> > >
> > > >
> > >
> > > > Thanks
> > >
> > > >
> > >
> > > > Scott
> > >
> > > >
> > >
> > > > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
> > >
> > > > <Ge...@medco.com>wrote:
> > >
> > > >
> > >
> > > > > Where can I find XMLschema file for log4j XML configuration
> > file????
> > >
> > > > >
> > >
> > > > >
> > >
> > > > > Thank U,
> > >
> > > > > VGSS
> > >
> > > > >
> > >
> > > > > -----Original Message-----
> > >
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > >
> > > > > Sent: Wednesday, September 14, 2011 4:51 PM
> > >
> > > > > To: Log4J Users List
> > >
> > > > > Subject: Re: log4j----Edit the event received
> > >
> > > > >
> > >
> > > > > Missed the end param on the nested properties param...not sure
> > about
> > >
> > > > > case of
> > >
> > > > > RewritePolicy node name..may be rewritePolicy.
> > >
> > > > >
> > >
> > > > > <appender name="rewrite"
> > >
> > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > >
> > > > >    <appender name="socket"
> > >
> > > > class="org.apache.log4j.net.SocketAppender">
> > >
> > > > >      <param name="Port" value="12346"/>
> > >
> > > > >      <param name="RemoteHost" value="localhost"/>
> > >
> > > > >      <param name="Application" value="app1"/>
> > >
> > > > >      <param name="ReconnectionDelay" value="60000"/>
> > >
> > > > >      <param name="Threshold" value="ALL"/>
> > >
> > > > >    </appender>
> > >
> > > > >    <RewritePolicy name="propertyPolicy"
> > >
> > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > >
> > > > >        <param name="properties"
> > >
> > > > >
> > >
> > > >
> > >
> >
>
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> > >
> > > > > tyvalue2"/>
> > >
> > > > >    </RewritePolicy>
> > >
> > > > > </appender>
> > >
> > > > >
> > >
> > > > >
> > >
> > > > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> > >
> > > > > <Ge...@medco.com>wrote:
> > >
> > > > >
> > >
> > > > > > Thank U...
> > >
> > > > > >
> > >
> > > > > > -----Original Message-----
> > >
> > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > >
> > > > > > Sent: Wednesday, September 14, 2011 4:31 PM
> > >
> > > > > > To: Log4J Users List
> > >
> > > > > > Subject: Re: log4j----Edit the event received
> > >
> > > > > >
> > >
> > > > > > remoteSourceInfo contains the connected port:
> > >
> > > > > >
> > >
> > > > > > hostName = socket.getInetAddress().getHostName();
> > >
> > > > > > remoteInfo = hostName + ":" + socket.getPort();
> > >
> > > > > >
> > >
> > > > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> > >
> > > > > > <Ge...@medco.com>wrote:
> > >
> > > > > >
> > >
> > > > > > > yes, I got them
> > >
> > > > > > >
> > >
> > > > > > > how are "hostname" and " log4j.remoteSourceInfo"
different
> > from
> > >
> > > > > each
> > >
> > > > > > > other....
> > >
> > > > > > >
> > >
> > > > > > > thank U
> > >
> > > > > > > VGSS
> > >
> > > > > > >
> > >
> > > > > > >
> > >
> > > > > > > -----Original Message-----
> > >
> > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > >
> > > > > > > Sent: Wednesday, September 14, 2011 4:15 PM
> > >
> > > > > > > To: Log4J Users List
> > >
> > > > > > > Subject: Re: log4j----Edit the event received
> > >
> > > > > > >
> > >
> > > > > > > The SocketReceiver adds two properties to each event:
> > >
> > > > > > > hostname
> > >
> > > > > > > log4j.remoteSourceInfo
> > >
> > > > > > >
> > >
> > > > > > > With the developer snapshot of Chainsaw you should see
those
> > as
> > >
> > > > > > > individual
> > >
> > > > > > > columns in the table.  If they aren't displayed by default
> you
> > > can
> > >
> > > > > > > enable
> > >
> > > > > > > them via the tab preferences menu (select Columns).
> > >
> > > > > > >
> > >
> > > > > > > Scott
> > >
> > > > > > >
> > >
> > > > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > >
> > > > > > > <Ge...@medco.com>wrote:
> > >
> > > > > > >
> > >
> > > > > > > > Hi,
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >  What I am looking for is, every event received by
> > >
> > > > SocketAppender,
> > >
> > > > > > > even
> > >
> > > > > > > > before it send to remote machine, it must append  to the
> > >
> > > > event(on
> > >
> > > > > > > which
> > >
> > > > > > > > log4j is running).
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >  Can any one please tell me a solution for this.
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > > Example: if application(running on machine HOSTNAME)
logs
> > >
> > > > message
> > >
> > > > > "I
> > >
> > > > > > > am
> > >
> > > > > > > > a Logging event", than SOCKET APPENDER must send
following
> > to
> > >
> > > > > REMOTE
> > >
> > > > > > > > machine(or SOCKET RECEIVER on Remote machine should
> receive
> > >
> > > > > > following
> > >
> > > > > > > as
> > >
> > > > > > > > log message).
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > > "HOSTNAME:I am a Logging event"
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > > Thank U,
> > >
> > > > > > > >
> > >
> > > > > > > > VGSS
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > >
> > >
> > > >
> >
**********************************************************************
> > >
> > > > > > > > This e-mail message and any attachments contain
> confidential
> > >
> > > > > > > information
> > >
> > > > > > > > from Medco. If you are not the intended recipient, you
are
> > >
> > > > hereby
> > >
> > > > > > > notified
> > >
> > > > > > > > that disclosure, printing, copying, distribution, or the
> > > taking
> > >
> > > > of
> > >
> > > > > > any
> > >
> > > > > > > > action in reliance on the contents of this electronic
> > >
> > > > information
> > >
> > > > > is
> > >
> > > > > > > > strictly prohibited. If you have received this e-mail
> > message
> > > in
> > >
> > > > > > > error,
> > >
> > > > > > > > please immediately notify the sender by reply message
and
> > then
> > >
> > > > > > delete
> > >
> > > > > > > the
> > >
> > > > > > > > electronic message and any attachments.
> > >
> > > > > > > >
> > >
> > > > > > >
> > >
> > > > > > >
> > >
> > > > >
> > >
> **********************************************************************
> > >
> > > > > > > This e-mail message and any attachments contain
confidential
> > >
> > > > > > information
> > >
> > > > > > > from Medco. If you are not the intended recipient, you are
> > > hereby
> > >
> > > > > > notified
> > >
> > > > > > > that disclosure, printing, copying, distribution, or the
> > taking
> > > of
> > >
> > > > > any
> > >
> > > > > > > action in reliance on the contents of this electronic
> > > information
> > >
> > > > is
> > >
> > > > > > > strictly prohibited. If you have received this e-mail
> message
> > in
> > >
> > > > > > error,
> > >
> > > > > > > please immediately notify the sender by reply message and
> then
> > >
> > > > > delete
> > >
> > > > > > the
> > >
> > > > > > > electronic message and any attachments.
> > >
> > > > > > >
> > >
> > > > > > >
> > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > >
> > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > >
> > > > > > > For additional commands, e-mail:
> > >
> > > > log4j-user-help@logging.apache.org
> > >
> > > > > > >
> > >
> > > > > > >
> > >
> > > > > >
> > >
> > > > > >
> > >
> > > >
> >
**********************************************************************
> > >
> > > > > > This e-mail message and any attachments contain confidential
> > >
> > > > > information
> > >
> > > > > > from Medco. If you are not the intended recipient, you are
> > hereby
> > >
> > > > > notified
> > >
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
> > of
> > >
> > > > any
> > >
> > > > > > action in reliance on the contents of this electronic
> > information
> > > is
> > >
> > > > > > strictly prohibited. If you have received this e-mail
message
> in
> > >
> > > > > error,
> > >
> > > > > > please immediately notify the sender by reply message and
then
> > >
> > > > delete
> > >
> > > > > the
> > >
> > > > > > electronic message and any attachments.
> > >
> > > > > >
> > >
> > > > > >
> > >
> > > >
> >
---------------------------------------------------------------------
> > >
> > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> > >
> > > > > > For additional commands, e-mail:
> > > log4j-user-help@logging.apache.org
> > >
> > > > > >
> > >
> > > > > >
> > >
> > > > >
> > >
> > > > >
> > >
> **********************************************************************
> > >
> > > > > This e-mail message and any attachments contain confidential
> > >
> > > > information
> > >
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > >
> > > > notified
> > >
> > > > > that disclosure, printing, copying, distribution, or the
taking
> of
> > > any
> > >
> > > > > action in reliance on the contents of this electronic
> information
> > is
> > >
> > > > > strictly prohibited. If you have received this e-mail message
in
> > >
> > > > error,
> > >
> > > > > please immediately notify the sender by reply message and then
> > > delete
> > >
> > > > the
> > >
> > > > > electronic message and any attachments.
> > >
> > > > >
> > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > >
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > >
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > >
> > > > >
> > >
> > > > >
> > >
> > > >
> > >
> > > >
> >
**********************************************************************
> > >
> > > > This e-mail message and any attachments contain confidential
> > > information
> > >
> > > > from Medco. If you are not the intended recipient, you are
hereby
> > >
> > > > notified that disclosure, printing, copying, distribution, or
the
> > > taking
> > >
> > > > of any action in reliance on the contents of this electronic
> > > information
> > >
> > > > is strictly prohibited. If you have received this e-mail message
> in
> > >
> > > > error, please immediately notify the sender by reply message and
> > then
> > >
> > > > delete the electronic message and any attachments.
> > >
> > > >
> > >
> > > >
> >
---------------------------------------------------------------------
> > >
> > > > To unsubscribe, e-mail:
log4j-user-unsubscribe@logging.apache.org
> > >
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > >
> > > >
> > >
> > > >
> >
**********************************************************************
> > >
> > > > This e-mail message and any attachments contain confidential
> > > information
> > >
> > > > from Medco. If you are not the intended recipient, you are
hereby
> > > notified
> > >
> > > > that disclosure, printing, copying, distribution, or the taking
of
> > any
> > >
> > > > action in reliance on the contents of this electronic
information
> is
> > >
> > > > strictly prohibited. If you have received this e-mail message in
> > > error,
> > >
> > > > please immediately notify the sender by reply message and then
> > delete
> > > the
> > >
> > > > electronic message and any attachments.
> > >
> > > >
> > >
> > > >
> >
---------------------------------------------------------------------
> > >
> > > > To unsubscribe, e-mail:
log4j-user-unsubscribe@logging.apache.org
> > >
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > >
> > > >
> > >
> > > >
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information
is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> >
> >
**********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> > notified that disclosure, printing, copying, distribution, or the
> taking
> > of any action in reliance on the contents of this electronic
> information
> > is strictly prohibited. If you have received this e-mail message in
> > error, please immediately notify the sender by reply message and
then
> > delete the electronic message and any attachments.
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
**********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of
any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then
delete
> the
> > electronic message and any attachments.
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


Re: log4j----Edit the event received

Posted by Scott Deboy <sc...@gmail.com>.
I haven't seen that issue before...you should be able to use any of the
configuration files in the test folder:

http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/src/test/resources/org/apache/log4j/rewrite/map.xml?revision=564831&view=markup

On Mon, Sep 19, 2011 at 9:46 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

> I used the same log4j.xml I used by chainsaw in my application and
> exactly same classpath , than I get following exception.
>
>
> log4j:WARN Continuable parsing error 2 and column 82
> log4j:WARN Document root element "log4j:configuration", must match
> DOCTYPE root "null".
> log4j:WARN Continuable parsing error 2 and column 82
> log4j:WARN Document is invalid: no grammar found.
>
>
> Chainsaw config is.
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> debug="true">
>    <plugin class="org.apache.log4j.net.SocketReceiver"
> name="SocketReceiver-12346">
>        <param name="active" value="true"/>
>        <param name="advertiseViaMulticastDNS" value="false"/>
>        <param name="class" value="class
> org.apache.log4j.net.SocketReceiver"/>
>        <param name="connectedSocketDetails" value="[]"/>
>        <param name="name" value="SocketReceiver-12346"/>
>        <param name="paused" value="false"/>
>        <param name="port" value="12346"/>
>        <param name="threshold" value="TRACE"/>
>    </plugin>
>   <appender name="F1" class="org.apache.log4j.FileAppender">
>        <param name="file" value="c:/LogsDir/file.txt"/>
>        <param name="append" value="false"/>
>       <layout class="org.apache.log4j.PatternLayout">
>         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> p2:%X{p2} %m%n"/>
>       </layout>
>     </appender>
>
>
>     <appender name="A1"
> class="org.apache.log4j.rewrite.RewriteAppender">
>       <appender-ref ref="F1"/>
>       <rewritePolicy
> class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
>       </rewritePolicy>
>     </appender>
>
>   <root>
>      <level value="debug"/>
>       <appender-ref ref="A1" />
>    </root>
>
> </log4j:configuration>
>
> This makes me to think that is chainsaw code responsible for making it
> to work???????????????????????
>
>
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Friday, September 16, 2011 4:03 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> In theory then, you should be able to add the entire chainsaw classpath
> to
> your application classpath and see it work..yes?
>
> On Fri, Sep 16, 2011 at 12:58 PM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > Just adding to last post , I am using log4j1.2.16 which is the one
> used
> > by chainsaw application too...
> >
> > -----Original Message-----
> > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > Sent: Friday, September 16, 2011 3:26 PM
> > To: Log4J Users List
> > Subject: RE: log4j----Edit the event received
> >
> > Even for me it is working on chainsaw side.
> > But if I have this on my application side where I define
> SocketAppender
> > , it is not working, I included components ,extras and receivers jars.
> >
> >
> > Thank U,
> > VGSS
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Friday, September 16, 2011 3:03 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > I just tried this and it worked fine....I modified the Chainsaw config
> > file
> > I was using (anything received by Chainsaw can also be sent to
> appenders
> > defined in the same config)...configuration and example log file
> output
> > below:
> >
> > Here's what I added to the Chainsaw config file:
> >   <appender name="F1" class="org.apache.log4j.FileAppender">
> >       <param name="file" value="c:/temp/file.txt"/>
> >       <param name="append" value="false"/>
> >       <layout class="org.apache.log4j.PatternLayout">
> >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > p2:%X{p2}
> > %m%n"/>
> >       </layout>
> >     </appender>
> >
> >
> >     <appender name="A1"
> > class="org.apache.log4j.rewrite.RewriteAppender">
> >       <appender-ref ref="F1"/>
> >       <rewritePolicy
> > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> >         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
> >       </rewritePolicy>
> >     </appender>
> >
> >   <root>
> >      <level value="debug"/>
> >       <appender-ref ref="A1" />
> >    </root>
> >
> > And here is an example output line:
> > DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE   RI-
> > RI.DRI
> >  FATAL ERROR WARNING INFO
> >
> >
> > On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > I tried this, its not working, following are warnings I get
> > >
> > >
> > >
> > >
> > >
> > > log4j:WARN Continuable parsing error 48 and column 80
> > >
> > > log4j:WARN Element type "rewritePolicy" must be declared.
> > >
> > > log4j:WARN Continuable parsing error 52 and column 14
> > >
> > > log4j:WARN The content of element type "appender" must match
> > >
> >
> "(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > > ?,layout?,filter*,appender-ref*)".
> > >
> > >
> > >
> > >
> > >
> > > Adding an Appender to RewriteAppender is working fine, but assigning
> > > rewritePolicy to a RewriteAppender is failing.
> > >
> > >
> > >
> > >
> > >
> > > Thank U,
> > >
> > > VGSS
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > Sent: Friday, September 16, 2011 1:48 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j----Edit the event received
> > >
> > >
> > >
> > > Here is an example from the tests in log4j:
> > >
> > >
> > >
> > >
> >
> http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> > >
> >
> c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> > > ev=564831
> > >
> > >
> > >
> > >     <appender name="F1" class="org.apache.log4j.FileAppender">
> > >
> > >       <param name="file" value="temp"/>
> > >
> > >       <param name="append" value="false"/>
> > >
> > >       <layout class="org.apache.log4j.PatternLayout">
> > >
> > >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > > p2:%X{p2}
> > >
> > > %m%n"/>
> > >
> > >       </layout>
> > >
> > >     </appender>
> > >
> > >
> > >
> > >
> > >
> > >     <appender name="A1"
> > > class="org.apache.log4j.rewrite.RewriteAppender">
> > >
> > >       <appender-ref ref="F1"/>
> > >
> > >       <rewritePolicy
> > >
> > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > >
> > >         <param name="properties"
> value="p1=Hello,p2=World,x1=3.1415"/>
> > >
> > >       </rewritePolicy>
> > >
> > >     </appender>
> > >
> > >
> > >
> > >     <root>
> > >
> > >       <level value ="debug" />
> > >
> > >       <appender-ref ref="A1" />
> > >
> > >     </root>
> > >
> > >
> > >
> > > On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
> > >
> > > <Ge...@medco.com>wrote:
> > >
> > >
> > >
> > > > Would any one please give an example of xml configuration file
> with
> > >
> > > > Rewrite Appender.
> > >
> > > >
> > >
> > > > Thank U,
> > >
> > > > Vgss
> > >
> > > >
> > >
> > > > -----Original Message-----
> > >
> > > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> > >
> > > > Sent: Thursday, September 15, 2011 1:57 PM
> > >
> > > > To: Log4J Users List
> > >
> > > > Subject: RE: log4j----Edit the event received
> > >
> > > >
> > >
> > > > log4j: Trying to find [server2Rewritelog4j.xml] using context
> > >
> > > > classloader sun.misc.Launcher$AppClassLoader@601bb1.
> > >
> > > > log4j: Using URL
> > >
> > > >
> [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> > > for
> > >
> > > > automatic log4j configuration.
> > >
> > > > log4j: Preferred configurator class:
> > >
> > > > org.apache.log4j.xml.DOMConfigurator
> > >
> > > > log4j: System property is :null
> > >
> > > > log4j: Standard DocumentBuilderFactory search succeded.
> > >
> > > > log4j: DocumentBuilderFactory is:
> > >
> > > > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> > >
> > > > log4j:WARN Continuable parsing error 19 and column 97
> > >
> > > > log4j:WARN Element type "rewritePolicy" must be declared.
> > >
> > > > log4j:WARN Continuable parsing error 22 and column 12
> > >
> > > > log4j:WARN The content of element type "appender" must match
> > >
> > > >
> > >
> >
> "(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > >
> > > > ?,layout?,filter*,appender-ref*)".
> > >
> > > > log4j: debug attribute= "null".
> > >
> > > > log4j: Ignoring debug attribute.
> > >
> > > > log4j: reset attribute= "false".
> > >
> > > > log4j: Threshold ="null".
> > >
> > > > log4j: Level value for root is  [debug].
> > >
> > > > log4j: root level set to DEBUG
> > >
> > > > log4j: Class name: [org.apache.log4j.ConsoleAppender]
> > >
> > > > log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
> > >
> > > > log4j: Setting property [conversionPattern] to [[%d{ISO8601} %t
> %c]
> > >
> > > > %m%n].
> > >
> > > > log4j: Adding appender named [CA] to category [root]
> > >
> > > >
> > >
> > > > -----Original Message-----
> > >
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > >
> > > > Sent: Thursday, September 15, 2011 1:54 PM
> > >
> > > > To: Log4J Users List
> > >
> > > > Subject: Re: log4j----Edit the event received
> > >
> > > >
> > >
> > > > There is a DTD for core elements but alternate elements can be
> added
> > >
> > > > (like
> > >
> > > > rewritepolicy)...you won't find rewritepolicy in the DTD.
> > >
> > > >
> > >
> > > > Can you add -Dlog4j.debug=true to your appender-side java command,
> > and
> > >
> > > > paste
> > >
> > > > the output?
> > >
> > > >
> > >
> > > > Thanks
> > >
> > > >
> > >
> > > > Scott
> > >
> > > >
> > >
> > > > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
> > >
> > > > <Ge...@medco.com>wrote:
> > >
> > > >
> > >
> > > > > Where can I find XMLschema file for log4j XML configuration
> > file????
> > >
> > > > >
> > >
> > > > >
> > >
> > > > > Thank U,
> > >
> > > > > VGSS
> > >
> > > > >
> > >
> > > > > -----Original Message-----
> > >
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > >
> > > > > Sent: Wednesday, September 14, 2011 4:51 PM
> > >
> > > > > To: Log4J Users List
> > >
> > > > > Subject: Re: log4j----Edit the event received
> > >
> > > > >
> > >
> > > > > Missed the end param on the nested properties param...not sure
> > about
> > >
> > > > > case of
> > >
> > > > > RewritePolicy node name..may be rewritePolicy.
> > >
> > > > >
> > >
> > > > > <appender name="rewrite"
> > >
> > > > > class="org.apache.log4j.rewrite.RewriteAppender">
> > >
> > > > >    <appender name="socket"
> > >
> > > > class="org.apache.log4j.net.SocketAppender">
> > >
> > > > >      <param name="Port" value="12346"/>
> > >
> > > > >      <param name="RemoteHost" value="localhost"/>
> > >
> > > > >      <param name="Application" value="app1"/>
> > >
> > > > >      <param name="ReconnectionDelay" value="60000"/>
> > >
> > > > >      <param name="Threshold" value="ALL"/>
> > >
> > > > >    </appender>
> > >
> > > > >    <RewritePolicy name="propertyPolicy"
> > >
> > > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> > >
> > > > >        <param name="properties"
> > >
> > > > >
> > >
> > > >
> > >
> >
> value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> > >
> > > > > tyvalue2"/>
> > >
> > > > >    </RewritePolicy>
> > >
> > > > > </appender>
> > >
> > > > >
> > >
> > > > >
> > >
> > > > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> > >
> > > > > <Ge...@medco.com>wrote:
> > >
> > > > >
> > >
> > > > > > Thank U...
> > >
> > > > > >
> > >
> > > > > > -----Original Message-----
> > >
> > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > >
> > > > > > Sent: Wednesday, September 14, 2011 4:31 PM
> > >
> > > > > > To: Log4J Users List
> > >
> > > > > > Subject: Re: log4j----Edit the event received
> > >
> > > > > >
> > >
> > > > > > remoteSourceInfo contains the connected port:
> > >
> > > > > >
> > >
> > > > > > hostName = socket.getInetAddress().getHostName();
> > >
> > > > > > remoteInfo = hostName + ":" + socket.getPort();
> > >
> > > > > >
> > >
> > > > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> > >
> > > > > > <Ge...@medco.com>wrote:
> > >
> > > > > >
> > >
> > > > > > > yes, I got them
> > >
> > > > > > >
> > >
> > > > > > > how are "hostname" and " log4j.remoteSourceInfo"  different
> > from
> > >
> > > > > each
> > >
> > > > > > > other....
> > >
> > > > > > >
> > >
> > > > > > > thank U
> > >
> > > > > > > VGSS
> > >
> > > > > > >
> > >
> > > > > > >
> > >
> > > > > > > -----Original Message-----
> > >
> > > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > >
> > > > > > > Sent: Wednesday, September 14, 2011 4:15 PM
> > >
> > > > > > > To: Log4J Users List
> > >
> > > > > > > Subject: Re: log4j----Edit the event received
> > >
> > > > > > >
> > >
> > > > > > > The SocketReceiver adds two properties to each event:
> > >
> > > > > > > hostname
> > >
> > > > > > > log4j.remoteSourceInfo
> > >
> > > > > > >
> > >
> > > > > > > With the developer snapshot of Chainsaw you should see those
> > as
> > >
> > > > > > > individual
> > >
> > > > > > > columns in the table.  If they aren't displayed by default
> you
> > > can
> > >
> > > > > > > enable
> > >
> > > > > > > them via the tab preferences menu (select Columns).
> > >
> > > > > > >
> > >
> > > > > > > Scott
> > >
> > > > > > >
> > >
> > > > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > >
> > > > > > > <Ge...@medco.com>wrote:
> > >
> > > > > > >
> > >
> > > > > > > > Hi,
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >  What I am looking for is, every event received by
> > >
> > > > SocketAppender,
> > >
> > > > > > > even
> > >
> > > > > > > > before it send to remote machine, it must append  to the
> > >
> > > > event(on
> > >
> > > > > > > which
> > >
> > > > > > > > log4j is running).
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >  Can any one please tell me a solution for this.
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > > Example: if application(running on machine HOSTNAME) logs
> > >
> > > > message
> > >
> > > > > "I
> > >
> > > > > > > am
> > >
> > > > > > > > a Logging event", than SOCKET APPENDER must send following
> > to
> > >
> > > > > REMOTE
> > >
> > > > > > > > machine(or SOCKET RECEIVER on Remote machine should
> receive
> > >
> > > > > > following
> > >
> > > > > > > as
> > >
> > > > > > > > log message).
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > > "HOSTNAME:I am a Logging event"
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > > > > Thank U,
> > >
> > > > > > > >
> > >
> > > > > > > > VGSS
> > >
> > > > > > > >
> > >
> > > > > > > >
> > >
> > > > > >
> > >
> > > >
> > **********************************************************************
> > >
> > > > > > > > This e-mail message and any attachments contain
> confidential
> > >
> > > > > > > information
> > >
> > > > > > > > from Medco. If you are not the intended recipient, you are
> > >
> > > > hereby
> > >
> > > > > > > notified
> > >
> > > > > > > > that disclosure, printing, copying, distribution, or the
> > > taking
> > >
> > > > of
> > >
> > > > > > any
> > >
> > > > > > > > action in reliance on the contents of this electronic
> > >
> > > > information
> > >
> > > > > is
> > >
> > > > > > > > strictly prohibited. If you have received this e-mail
> > message
> > > in
> > >
> > > > > > > error,
> > >
> > > > > > > > please immediately notify the sender by reply message and
> > then
> > >
> > > > > > delete
> > >
> > > > > > > the
> > >
> > > > > > > > electronic message and any attachments.
> > >
> > > > > > > >
> > >
> > > > > > >
> > >
> > > > > > >
> > >
> > > > >
> > >
> **********************************************************************
> > >
> > > > > > > This e-mail message and any attachments contain confidential
> > >
> > > > > > information
> > >
> > > > > > > from Medco. If you are not the intended recipient, you are
> > > hereby
> > >
> > > > > > notified
> > >
> > > > > > > that disclosure, printing, copying, distribution, or the
> > taking
> > > of
> > >
> > > > > any
> > >
> > > > > > > action in reliance on the contents of this electronic
> > > information
> > >
> > > > is
> > >
> > > > > > > strictly prohibited. If you have received this e-mail
> message
> > in
> > >
> > > > > > error,
> > >
> > > > > > > please immediately notify the sender by reply message and
> then
> > >
> > > > > delete
> > >
> > > > > > the
> > >
> > > > > > > electronic message and any attachments.
> > >
> > > > > > >
> > >
> > > > > > >
> > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > >
> > > > > > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@logging.apache.org
> > >
> > > > > > > For additional commands, e-mail:
> > >
> > > > log4j-user-help@logging.apache.org
> > >
> > > > > > >
> > >
> > > > > > >
> > >
> > > > > >
> > >
> > > > > >
> > >
> > > >
> > **********************************************************************
> > >
> > > > > > This e-mail message and any attachments contain confidential
> > >
> > > > > information
> > >
> > > > > > from Medco. If you are not the intended recipient, you are
> > hereby
> > >
> > > > > notified
> > >
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
> > of
> > >
> > > > any
> > >
> > > > > > action in reliance on the contents of this electronic
> > information
> > > is
> > >
> > > > > > strictly prohibited. If you have received this e-mail message
> in
> > >
> > > > > error,
> > >
> > > > > > please immediately notify the sender by reply message and then
> > >
> > > > delete
> > >
> > > > > the
> > >
> > > > > > electronic message and any attachments.
> > >
> > > > > >
> > >
> > > > > >
> > >
> > > >
> > ---------------------------------------------------------------------
> > >
> > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> > >
> > > > > > For additional commands, e-mail:
> > > log4j-user-help@logging.apache.org
> > >
> > > > > >
> > >
> > > > > >
> > >
> > > > >
> > >
> > > > >
> > >
> **********************************************************************
> > >
> > > > > This e-mail message and any attachments contain confidential
> > >
> > > > information
> > >
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > >
> > > > notified
> > >
> > > > > that disclosure, printing, copying, distribution, or the taking
> of
> > > any
> > >
> > > > > action in reliance on the contents of this electronic
> information
> > is
> > >
> > > > > strictly prohibited. If you have received this e-mail message in
> > >
> > > > error,
> > >
> > > > > please immediately notify the sender by reply message and then
> > > delete
> > >
> > > > the
> > >
> > > > > electronic message and any attachments.
> > >
> > > > >
> > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > >
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> > >
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> > >
> > > > >
> > >
> > > > >
> > >
> > > >
> > >
> > > >
> > **********************************************************************
> > >
> > > > This e-mail message and any attachments contain confidential
> > > information
> > >
> > > > from Medco. If you are not the intended recipient, you are hereby
> > >
> > > > notified that disclosure, printing, copying, distribution, or the
> > > taking
> > >
> > > > of any action in reliance on the contents of this electronic
> > > information
> > >
> > > > is strictly prohibited. If you have received this e-mail message
> in
> > >
> > > > error, please immediately notify the sender by reply message and
> > then
> > >
> > > > delete the electronic message and any attachments.
> > >
> > > >
> > >
> > > >
> > ---------------------------------------------------------------------
> > >
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > >
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > >
> > > >
> > >
> > > >
> > **********************************************************************
> > >
> > > > This e-mail message and any attachments contain confidential
> > > information
> > >
> > > > from Medco. If you are not the intended recipient, you are hereby
> > > notified
> > >
> > > > that disclosure, printing, copying, distribution, or the taking of
> > any
> > >
> > > > action in reliance on the contents of this electronic information
> is
> > >
> > > > strictly prohibited. If you have received this e-mail message in
> > > error,
> > >
> > > > please immediately notify the sender by reply message and then
> > delete
> > > the
> > >
> > > > electronic message and any attachments.
> > >
> > > >
> > >
> > > >
> > ---------------------------------------------------------------------
> > >
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > >
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > >
> > > >
> > >
> > > >
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> >
> > **********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> > notified that disclosure, printing, copying, distribution, or the
> taking
> > of any action in reliance on the contents of this electronic
> information
> > is strictly prohibited. If you have received this e-mail message in
> > error, please immediately notify the sender by reply message and then
> > delete the electronic message and any attachments.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> > **********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then delete
> the
> > electronic message and any attachments.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in error,
> please immediately notify the sender by reply message and then delete the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
I used the same log4j.xml I used by chainsaw in my application and
exactly same classpath , than I get following exception.


log4j:WARN Continuable parsing error 2 and column 82
log4j:WARN Document root element "log4j:configuration", must match
DOCTYPE root "null".
log4j:WARN Continuable parsing error 2 and column 82
log4j:WARN Document is invalid: no grammar found.


Chainsaw config is.


<?xml version="1.0" encoding="UTF-8"?>
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="true">
    <plugin class="org.apache.log4j.net.SocketReceiver"
name="SocketReceiver-12346">
        <param name="active" value="true"/>
        <param name="advertiseViaMulticastDNS" value="false"/>
        <param name="class" value="class
org.apache.log4j.net.SocketReceiver"/>
        <param name="connectedSocketDetails" value="[]"/>
        <param name="name" value="SocketReceiver-12346"/>
        <param name="paused" value="false"/>
        <param name="port" value="12346"/>
        <param name="threshold" value="TRACE"/>
    </plugin>
  <appender name="F1" class="org.apache.log4j.FileAppender">
       <param name="file" value="c:/LogsDir/file.txt"/>
       <param name="append" value="false"/>
       <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
p2:%X{p2} %m%n"/>
       </layout>
     </appender>


     <appender name="A1"
class="org.apache.log4j.rewrite.RewriteAppender">
       <appender-ref ref="F1"/>
       <rewritePolicy
class="org.apache.log4j.rewrite.PropertyRewritePolicy">
         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
       </rewritePolicy>
     </appender>

   <root>
      <level value="debug"/>
       <appender-ref ref="A1" />
    </root>

</log4j:configuration>

This makes me to think that is chainsaw code responsible for making it
to work???????????????????????



-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Friday, September 16, 2011 4:03 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

In theory then, you should be able to add the entire chainsaw classpath
to
your application classpath and see it work..yes?

On Fri, Sep 16, 2011 at 12:58 PM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Just adding to last post , I am using log4j1.2.16 which is the one
used
> by chainsaw application too...
>
> -----Original Message-----
> From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> Sent: Friday, September 16, 2011 3:26 PM
> To: Log4J Users List
> Subject: RE: log4j----Edit the event received
>
> Even for me it is working on chainsaw side.
> But if I have this on my application side where I define
SocketAppender
> , it is not working, I included components ,extras and receivers jars.
>
>
> Thank U,
> VGSS
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Friday, September 16, 2011 3:03 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> I just tried this and it worked fine....I modified the Chainsaw config
> file
> I was using (anything received by Chainsaw can also be sent to
appenders
> defined in the same config)...configuration and example log file
output
> below:
>
> Here's what I added to the Chainsaw config file:
>   <appender name="F1" class="org.apache.log4j.FileAppender">
>       <param name="file" value="c:/temp/file.txt"/>
>       <param name="append" value="false"/>
>       <layout class="org.apache.log4j.PatternLayout">
>         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> p2:%X{p2}
> %m%n"/>
>       </layout>
>     </appender>
>
>
>     <appender name="A1"
> class="org.apache.log4j.rewrite.RewriteAppender">
>       <appender-ref ref="F1"/>
>       <rewritePolicy
> class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
>       </rewritePolicy>
>     </appender>
>
>   <root>
>      <level value="debug"/>
>       <appender-ref ref="A1" />
>    </root>
>
> And here is an example output line:
> DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE   RI-
> RI.DRI
>  FATAL ERROR WARNING INFO
>
>
> On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > I tried this, its not working, following are warnings I get
> >
> >
> >
> >
> >
> > log4j:WARN Continuable parsing error 48 and column 80
> >
> > log4j:WARN Element type "rewritePolicy" must be declared.
> >
> > log4j:WARN Continuable parsing error 52 and column 14
> >
> > log4j:WARN The content of element type "appender" must match
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > ?,layout?,filter*,appender-ref*)".
> >
> >
> >
> >
> >
> > Adding an Appender to RewriteAppender is working fine, but assigning
> > rewritePolicy to a RewriteAppender is failing.
> >
> >
> >
> >
> >
> > Thank U,
> >
> > VGSS
> >
> >
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Friday, September 16, 2011 1:48 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> >
> >
> > Here is an example from the tests in log4j:
> >
> >
> >
> >
>
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> >
>
c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> > ev=564831
> >
> >
> >
> >     <appender name="F1" class="org.apache.log4j.FileAppender">
> >
> >       <param name="file" value="temp"/>
> >
> >       <param name="append" value="false"/>
> >
> >       <layout class="org.apache.log4j.PatternLayout">
> >
> >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > p2:%X{p2}
> >
> > %m%n"/>
> >
> >       </layout>
> >
> >     </appender>
> >
> >
> >
> >
> >
> >     <appender name="A1"
> > class="org.apache.log4j.rewrite.RewriteAppender">
> >
> >       <appender-ref ref="F1"/>
> >
> >       <rewritePolicy
> >
> > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> >
> >         <param name="properties"
value="p1=Hello,p2=World,x1=3.1415"/>
> >
> >       </rewritePolicy>
> >
> >     </appender>
> >
> >
> >
> >     <root>
> >
> >       <level value ="debug" />
> >
> >       <appender-ref ref="A1" />
> >
> >     </root>
> >
> >
> >
> > On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
> >
> > <Ge...@medco.com>wrote:
> >
> >
> >
> > > Would any one please give an example of xml configuration file
with
> >
> > > Rewrite Appender.
> >
> > >
> >
> > > Thank U,
> >
> > > Vgss
> >
> > >
> >
> > > -----Original Message-----
> >
> > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> >
> > > Sent: Thursday, September 15, 2011 1:57 PM
> >
> > > To: Log4J Users List
> >
> > > Subject: RE: log4j----Edit the event received
> >
> > >
> >
> > > log4j: Trying to find [server2Rewritelog4j.xml] using context
> >
> > > classloader sun.misc.Launcher$AppClassLoader@601bb1.
> >
> > > log4j: Using URL
> >
> > >
[file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> > for
> >
> > > automatic log4j configuration.
> >
> > > log4j: Preferred configurator class:
> >
> > > org.apache.log4j.xml.DOMConfigurator
> >
> > > log4j: System property is :null
> >
> > > log4j: Standard DocumentBuilderFactory search succeded.
> >
> > > log4j: DocumentBuilderFactory is:
> >
> > > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> >
> > > log4j:WARN Continuable parsing error 19 and column 97
> >
> > > log4j:WARN Element type "rewritePolicy" must be declared.
> >
> > > log4j:WARN Continuable parsing error 22 and column 12
> >
> > > log4j:WARN The content of element type "appender" must match
> >
> > >
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> >
> > > ?,layout?,filter*,appender-ref*)".
> >
> > > log4j: debug attribute= "null".
> >
> > > log4j: Ignoring debug attribute.
> >
> > > log4j: reset attribute= "false".
> >
> > > log4j: Threshold ="null".
> >
> > > log4j: Level value for root is  [debug].
> >
> > > log4j: root level set to DEBUG
> >
> > > log4j: Class name: [org.apache.log4j.ConsoleAppender]
> >
> > > log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
> >
> > > log4j: Setting property [conversionPattern] to [[%d{ISO8601} %t
%c]
> >
> > > %m%n].
> >
> > > log4j: Adding appender named [CA] to category [root]
> >
> > >
> >
> > > -----Original Message-----
> >
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> >
> > > Sent: Thursday, September 15, 2011 1:54 PM
> >
> > > To: Log4J Users List
> >
> > > Subject: Re: log4j----Edit the event received
> >
> > >
> >
> > > There is a DTD for core elements but alternate elements can be
added
> >
> > > (like
> >
> > > rewritepolicy)...you won't find rewritepolicy in the DTD.
> >
> > >
> >
> > > Can you add -Dlog4j.debug=true to your appender-side java command,
> and
> >
> > > paste
> >
> > > the output?
> >
> > >
> >
> > > Thanks
> >
> > >
> >
> > > Scott
> >
> > >
> >
> > > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
> >
> > > <Ge...@medco.com>wrote:
> >
> > >
> >
> > > > Where can I find XMLschema file for log4j XML configuration
> file????
> >
> > > >
> >
> > > >
> >
> > > > Thank U,
> >
> > > > VGSS
> >
> > > >
> >
> > > > -----Original Message-----
> >
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> >
> > > > Sent: Wednesday, September 14, 2011 4:51 PM
> >
> > > > To: Log4J Users List
> >
> > > > Subject: Re: log4j----Edit the event received
> >
> > > >
> >
> > > > Missed the end param on the nested properties param...not sure
> about
> >
> > > > case of
> >
> > > > RewritePolicy node name..may be rewritePolicy.
> >
> > > >
> >
> > > > <appender name="rewrite"
> >
> > > > class="org.apache.log4j.rewrite.RewriteAppender">
> >
> > > >    <appender name="socket"
> >
> > > class="org.apache.log4j.net.SocketAppender">
> >
> > > >      <param name="Port" value="12346"/>
> >
> > > >      <param name="RemoteHost" value="localhost"/>
> >
> > > >      <param name="Application" value="app1"/>
> >
> > > >      <param name="ReconnectionDelay" value="60000"/>
> >
> > > >      <param name="Threshold" value="ALL"/>
> >
> > > >    </appender>
> >
> > > >    <RewritePolicy name="propertyPolicy"
> >
> > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> >
> > > >        <param name="properties"
> >
> > > >
> >
> > >
> >
>
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> >
> > > > tyvalue2"/>
> >
> > > >    </RewritePolicy>
> >
> > > > </appender>
> >
> > > >
> >
> > > >
> >
> > > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> >
> > > > <Ge...@medco.com>wrote:
> >
> > > >
> >
> > > > > Thank U...
> >
> > > > >
> >
> > > > > -----Original Message-----
> >
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> >
> > > > > Sent: Wednesday, September 14, 2011 4:31 PM
> >
> > > > > To: Log4J Users List
> >
> > > > > Subject: Re: log4j----Edit the event received
> >
> > > > >
> >
> > > > > remoteSourceInfo contains the connected port:
> >
> > > > >
> >
> > > > > hostName = socket.getInetAddress().getHostName();
> >
> > > > > remoteInfo = hostName + ":" + socket.getPort();
> >
> > > > >
> >
> > > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> >
> > > > > <Ge...@medco.com>wrote:
> >
> > > > >
> >
> > > > > > yes, I got them
> >
> > > > > >
> >
> > > > > > how are "hostname" and " log4j.remoteSourceInfo"  different
> from
> >
> > > > each
> >
> > > > > > other....
> >
> > > > > >
> >
> > > > > > thank U
> >
> > > > > > VGSS
> >
> > > > > >
> >
> > > > > >
> >
> > > > > > -----Original Message-----
> >
> > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> >
> > > > > > Sent: Wednesday, September 14, 2011 4:15 PM
> >
> > > > > > To: Log4J Users List
> >
> > > > > > Subject: Re: log4j----Edit the event received
> >
> > > > > >
> >
> > > > > > The SocketReceiver adds two properties to each event:
> >
> > > > > > hostname
> >
> > > > > > log4j.remoteSourceInfo
> >
> > > > > >
> >
> > > > > > With the developer snapshot of Chainsaw you should see those
> as
> >
> > > > > > individual
> >
> > > > > > columns in the table.  If they aren't displayed by default
you
> > can
> >
> > > > > > enable
> >
> > > > > > them via the tab preferences menu (select Columns).
> >
> > > > > >
> >
> > > > > > Scott
> >
> > > > > >
> >
> > > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> >
> > > > > > <Ge...@medco.com>wrote:
> >
> > > > > >
> >
> > > > > > > Hi,
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >  What I am looking for is, every event received by
> >
> > > SocketAppender,
> >
> > > > > > even
> >
> > > > > > > before it send to remote machine, it must append  to the
> >
> > > event(on
> >
> > > > > > which
> >
> > > > > > > log4j is running).
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >  Can any one please tell me a solution for this.
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > > Example: if application(running on machine HOSTNAME) logs
> >
> > > message
> >
> > > > "I
> >
> > > > > > am
> >
> > > > > > > a Logging event", than SOCKET APPENDER must send following
> to
> >
> > > > REMOTE
> >
> > > > > > > machine(or SOCKET RECEIVER on Remote machine should
receive
> >
> > > > > following
> >
> > > > > > as
> >
> > > > > > > log message).
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > > "HOSTNAME:I am a Logging event"
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > > Thank U,
> >
> > > > > > >
> >
> > > > > > > VGSS
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > >
> >
> > >
> **********************************************************************
> >
> > > > > > > This e-mail message and any attachments contain
confidential
> >
> > > > > > information
> >
> > > > > > > from Medco. If you are not the intended recipient, you are
> >
> > > hereby
> >
> > > > > > notified
> >
> > > > > > > that disclosure, printing, copying, distribution, or the
> > taking
> >
> > > of
> >
> > > > > any
> >
> > > > > > > action in reliance on the contents of this electronic
> >
> > > information
> >
> > > > is
> >
> > > > > > > strictly prohibited. If you have received this e-mail
> message
> > in
> >
> > > > > > error,
> >
> > > > > > > please immediately notify the sender by reply message and
> then
> >
> > > > > delete
> >
> > > > > > the
> >
> > > > > > > electronic message and any attachments.
> >
> > > > > > >
> >
> > > > > >
> >
> > > > > >
> >
> > > >
> >
**********************************************************************
> >
> > > > > > This e-mail message and any attachments contain confidential
> >
> > > > > information
> >
> > > > > > from Medco. If you are not the intended recipient, you are
> > hereby
> >
> > > > > notified
> >
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
> > of
> >
> > > > any
> >
> > > > > > action in reliance on the contents of this electronic
> > information
> >
> > > is
> >
> > > > > > strictly prohibited. If you have received this e-mail
message
> in
> >
> > > > > error,
> >
> > > > > > please immediately notify the sender by reply message and
then
> >
> > > > delete
> >
> > > > > the
> >
> > > > > > electronic message and any attachments.
> >
> > > > > >
> >
> > > > > >
> >
> > > >
> >
---------------------------------------------------------------------
> >
> > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> >
> > > > > > For additional commands, e-mail:
> >
> > > log4j-user-help@logging.apache.org
> >
> > > > > >
> >
> > > > > >
> >
> > > > >
> >
> > > > >
> >
> > >
> **********************************************************************
> >
> > > > > This e-mail message and any attachments contain confidential
> >
> > > > information
> >
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> >
> > > > notified
> >
> > > > > that disclosure, printing, copying, distribution, or the
taking
> of
> >
> > > any
> >
> > > > > action in reliance on the contents of this electronic
> information
> > is
> >
> > > > > strictly prohibited. If you have received this e-mail message
in
> >
> > > > error,
> >
> > > > > please immediately notify the sender by reply message and then
> >
> > > delete
> >
> > > > the
> >
> > > > > electronic message and any attachments.
> >
> > > > >
> >
> > > > >
> >
> > >
> ---------------------------------------------------------------------
> >
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> >
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> >
> > > > >
> >
> > > > >
> >
> > > >
> >
> > > >
> >
**********************************************************************
> >
> > > > This e-mail message and any attachments contain confidential
> >
> > > information
> >
> > > > from Medco. If you are not the intended recipient, you are
hereby
> >
> > > notified
> >
> > > > that disclosure, printing, copying, distribution, or the taking
of
> > any
> >
> > > > action in reliance on the contents of this electronic
information
> is
> >
> > > > strictly prohibited. If you have received this e-mail message in
> >
> > > error,
> >
> > > > please immediately notify the sender by reply message and then
> > delete
> >
> > > the
> >
> > > > electronic message and any attachments.
> >
> > > >
> >
> > > >
> >
---------------------------------------------------------------------
> >
> > > > To unsubscribe, e-mail:
log4j-user-unsubscribe@logging.apache.org
> >
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> >
> > > >
> >
> > > >
> >
> > >
> >
> > >
> **********************************************************************
> >
> > > This e-mail message and any attachments contain confidential
> > information
> >
> > > from Medco. If you are not the intended recipient, you are hereby
> >
> > > notified that disclosure, printing, copying, distribution, or the
> > taking
> >
> > > of any action in reliance on the contents of this electronic
> > information
> >
> > > is strictly prohibited. If you have received this e-mail message
in
> >
> > > error, please immediately notify the sender by reply message and
> then
> >
> > > delete the electronic message and any attachments.
> >
> > >
> >
> > >
> ---------------------------------------------------------------------
> >
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >
> > > For additional commands, e-mail:
log4j-user-help@logging.apache.org
> >
> > >
> >
> > >
> **********************************************************************
> >
> > > This e-mail message and any attachments contain confidential
> > information
> >
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> >
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> >
> > > action in reliance on the contents of this electronic information
is
> >
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> >
> > > please immediately notify the sender by reply message and then
> delete
> > the
> >
> > > electronic message and any attachments.
> >
> > >
> >
> > >
> ---------------------------------------------------------------------
> >
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >
> > > For additional commands, e-mail:
log4j-user-help@logging.apache.org
> >
> > >
> >
> > >
> >
> >
**********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of
any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then
delete
> the
> > electronic message and any attachments.
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
> notified that disclosure, printing, copying, distribution, or the
taking
> of any action in reliance on the contents of this electronic
information
> is strictly prohibited. If you have received this e-mail message in
> error, please immediately notify the sender by reply message and then
> delete the electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


Re: log4j----Edit the event received

Posted by Scott Deboy <sc...@gmail.com>.
In theory then, you should be able to add the entire chainsaw classpath to
your application classpath and see it work..yes?

On Fri, Sep 16, 2011 at 12:58 PM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Just adding to last post , I am using log4j1.2.16 which is the one used
> by chainsaw application too...
>
> -----Original Message-----
> From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> Sent: Friday, September 16, 2011 3:26 PM
> To: Log4J Users List
> Subject: RE: log4j----Edit the event received
>
> Even for me it is working on chainsaw side.
> But if I have this on my application side where I define SocketAppender
> , it is not working, I included components ,extras and receivers jars.
>
>
> Thank U,
> VGSS
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Friday, September 16, 2011 3:03 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> I just tried this and it worked fine....I modified the Chainsaw config
> file
> I was using (anything received by Chainsaw can also be sent to appenders
> defined in the same config)...configuration and example log file output
> below:
>
> Here's what I added to the Chainsaw config file:
>   <appender name="F1" class="org.apache.log4j.FileAppender">
>       <param name="file" value="c:/temp/file.txt"/>
>       <param name="append" value="false"/>
>       <layout class="org.apache.log4j.PatternLayout">
>         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> p2:%X{p2}
> %m%n"/>
>       </layout>
>     </appender>
>
>
>     <appender name="A1"
> class="org.apache.log4j.rewrite.RewriteAppender">
>       <appender-ref ref="F1"/>
>       <rewritePolicy
> class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
>       </rewritePolicy>
>     </appender>
>
>   <root>
>      <level value="debug"/>
>       <appender-ref ref="A1" />
>    </root>
>
> And here is an example output line:
> DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE   RI-
> RI.DRI
>  FATAL ERROR WARNING INFO
>
>
> On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > I tried this, its not working, following are warnings I get
> >
> >
> >
> >
> >
> > log4j:WARN Continuable parsing error 48 and column 80
> >
> > log4j:WARN Element type "rewritePolicy" must be declared.
> >
> > log4j:WARN Continuable parsing error 52 and column 14
> >
> > log4j:WARN The content of element type "appender" must match
> >
> "(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> > ?,layout?,filter*,appender-ref*)".
> >
> >
> >
> >
> >
> > Adding an Appender to RewriteAppender is working fine, but assigning
> > rewritePolicy to a RewriteAppender is failing.
> >
> >
> >
> >
> >
> > Thank U,
> >
> > VGSS
> >
> >
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Friday, September 16, 2011 1:48 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> >
> >
> > Here is an example from the tests in log4j:
> >
> >
> >
> >
> http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> >
> c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> > ev=564831
> >
> >
> >
> >     <appender name="F1" class="org.apache.log4j.FileAppender">
> >
> >       <param name="file" value="temp"/>
> >
> >       <param name="append" value="false"/>
> >
> >       <layout class="org.apache.log4j.PatternLayout">
> >
> >         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> > p2:%X{p2}
> >
> > %m%n"/>
> >
> >       </layout>
> >
> >     </appender>
> >
> >
> >
> >
> >
> >     <appender name="A1"
> > class="org.apache.log4j.rewrite.RewriteAppender">
> >
> >       <appender-ref ref="F1"/>
> >
> >       <rewritePolicy
> >
> > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> >
> >         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
> >
> >       </rewritePolicy>
> >
> >     </appender>
> >
> >
> >
> >     <root>
> >
> >       <level value ="debug" />
> >
> >       <appender-ref ref="A1" />
> >
> >     </root>
> >
> >
> >
> > On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
> >
> > <Ge...@medco.com>wrote:
> >
> >
> >
> > > Would any one please give an example of xml configuration file with
> >
> > > Rewrite Appender.
> >
> > >
> >
> > > Thank U,
> >
> > > Vgss
> >
> > >
> >
> > > -----Original Message-----
> >
> > > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> >
> > > Sent: Thursday, September 15, 2011 1:57 PM
> >
> > > To: Log4J Users List
> >
> > > Subject: RE: log4j----Edit the event received
> >
> > >
> >
> > > log4j: Trying to find [server2Rewritelog4j.xml] using context
> >
> > > classloader sun.misc.Launcher$AppClassLoader@601bb1.
> >
> > > log4j: Using URL
> >
> > > [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> > for
> >
> > > automatic log4j configuration.
> >
> > > log4j: Preferred configurator class:
> >
> > > org.apache.log4j.xml.DOMConfigurator
> >
> > > log4j: System property is :null
> >
> > > log4j: Standard DocumentBuilderFactory search succeded.
> >
> > > log4j: DocumentBuilderFactory is:
> >
> > > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> >
> > > log4j:WARN Continuable parsing error 19 and column 97
> >
> > > log4j:WARN Element type "rewritePolicy" must be declared.
> >
> > > log4j:WARN Continuable parsing error 22 and column 12
> >
> > > log4j:WARN The content of element type "appender" must match
> >
> > >
> >
> "(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> >
> > > ?,layout?,filter*,appender-ref*)".
> >
> > > log4j: debug attribute= "null".
> >
> > > log4j: Ignoring debug attribute.
> >
> > > log4j: reset attribute= "false".
> >
> > > log4j: Threshold ="null".
> >
> > > log4j: Level value for root is  [debug].
> >
> > > log4j: root level set to DEBUG
> >
> > > log4j: Class name: [org.apache.log4j.ConsoleAppender]
> >
> > > log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
> >
> > > log4j: Setting property [conversionPattern] to [[%d{ISO8601} %t %c]
> >
> > > %m%n].
> >
> > > log4j: Adding appender named [CA] to category [root]
> >
> > >
> >
> > > -----Original Message-----
> >
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> >
> > > Sent: Thursday, September 15, 2011 1:54 PM
> >
> > > To: Log4J Users List
> >
> > > Subject: Re: log4j----Edit the event received
> >
> > >
> >
> > > There is a DTD for core elements but alternate elements can be added
> >
> > > (like
> >
> > > rewritepolicy)...you won't find rewritepolicy in the DTD.
> >
> > >
> >
> > > Can you add -Dlog4j.debug=true to your appender-side java command,
> and
> >
> > > paste
> >
> > > the output?
> >
> > >
> >
> > > Thanks
> >
> > >
> >
> > > Scott
> >
> > >
> >
> > > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
> >
> > > <Ge...@medco.com>wrote:
> >
> > >
> >
> > > > Where can I find XMLschema file for log4j XML configuration
> file????
> >
> > > >
> >
> > > >
> >
> > > > Thank U,
> >
> > > > VGSS
> >
> > > >
> >
> > > > -----Original Message-----
> >
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> >
> > > > Sent: Wednesday, September 14, 2011 4:51 PM
> >
> > > > To: Log4J Users List
> >
> > > > Subject: Re: log4j----Edit the event received
> >
> > > >
> >
> > > > Missed the end param on the nested properties param...not sure
> about
> >
> > > > case of
> >
> > > > RewritePolicy node name..may be rewritePolicy.
> >
> > > >
> >
> > > > <appender name="rewrite"
> >
> > > > class="org.apache.log4j.rewrite.RewriteAppender">
> >
> > > >    <appender name="socket"
> >
> > > class="org.apache.log4j.net.SocketAppender">
> >
> > > >      <param name="Port" value="12346"/>
> >
> > > >      <param name="RemoteHost" value="localhost"/>
> >
> > > >      <param name="Application" value="app1"/>
> >
> > > >      <param name="ReconnectionDelay" value="60000"/>
> >
> > > >      <param name="Threshold" value="ALL"/>
> >
> > > >    </appender>
> >
> > > >    <RewritePolicy name="propertyPolicy"
> >
> > > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> >
> > > >        <param name="properties"
> >
> > > >
> >
> > >
> >
> value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> >
> > > > tyvalue2"/>
> >
> > > >    </RewritePolicy>
> >
> > > > </appender>
> >
> > > >
> >
> > > >
> >
> > > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> >
> > > > <Ge...@medco.com>wrote:
> >
> > > >
> >
> > > > > Thank U...
> >
> > > > >
> >
> > > > > -----Original Message-----
> >
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> >
> > > > > Sent: Wednesday, September 14, 2011 4:31 PM
> >
> > > > > To: Log4J Users List
> >
> > > > > Subject: Re: log4j----Edit the event received
> >
> > > > >
> >
> > > > > remoteSourceInfo contains the connected port:
> >
> > > > >
> >
> > > > > hostName = socket.getInetAddress().getHostName();
> >
> > > > > remoteInfo = hostName + ":" + socket.getPort();
> >
> > > > >
> >
> > > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> >
> > > > > <Ge...@medco.com>wrote:
> >
> > > > >
> >
> > > > > > yes, I got them
> >
> > > > > >
> >
> > > > > > how are "hostname" and " log4j.remoteSourceInfo"  different
> from
> >
> > > > each
> >
> > > > > > other....
> >
> > > > > >
> >
> > > > > > thank U
> >
> > > > > > VGSS
> >
> > > > > >
> >
> > > > > >
> >
> > > > > > -----Original Message-----
> >
> > > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> >
> > > > > > Sent: Wednesday, September 14, 2011 4:15 PM
> >
> > > > > > To: Log4J Users List
> >
> > > > > > Subject: Re: log4j----Edit the event received
> >
> > > > > >
> >
> > > > > > The SocketReceiver adds two properties to each event:
> >
> > > > > > hostname
> >
> > > > > > log4j.remoteSourceInfo
> >
> > > > > >
> >
> > > > > > With the developer snapshot of Chainsaw you should see those
> as
> >
> > > > > > individual
> >
> > > > > > columns in the table.  If they aren't displayed by default you
> > can
> >
> > > > > > enable
> >
> > > > > > them via the tab preferences menu (select Columns).
> >
> > > > > >
> >
> > > > > > Scott
> >
> > > > > >
> >
> > > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> >
> > > > > > <Ge...@medco.com>wrote:
> >
> > > > > >
> >
> > > > > > > Hi,
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >  What I am looking for is, every event received by
> >
> > > SocketAppender,
> >
> > > > > > even
> >
> > > > > > > before it send to remote machine, it must append  to the
> >
> > > event(on
> >
> > > > > > which
> >
> > > > > > > log4j is running).
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >  Can any one please tell me a solution for this.
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > > Example: if application(running on machine HOSTNAME) logs
> >
> > > message
> >
> > > > "I
> >
> > > > > > am
> >
> > > > > > > a Logging event", than SOCKET APPENDER must send following
> to
> >
> > > > REMOTE
> >
> > > > > > > machine(or SOCKET RECEIVER on Remote machine should receive
> >
> > > > > following
> >
> > > > > > as
> >
> > > > > > > log message).
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > > "HOSTNAME:I am a Logging event"
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > > > > Thank U,
> >
> > > > > > >
> >
> > > > > > > VGSS
> >
> > > > > > >
> >
> > > > > > >
> >
> > > > >
> >
> > >
> **********************************************************************
> >
> > > > > > > This e-mail message and any attachments contain confidential
> >
> > > > > > information
> >
> > > > > > > from Medco. If you are not the intended recipient, you are
> >
> > > hereby
> >
> > > > > > notified
> >
> > > > > > > that disclosure, printing, copying, distribution, or the
> > taking
> >
> > > of
> >
> > > > > any
> >
> > > > > > > action in reliance on the contents of this electronic
> >
> > > information
> >
> > > > is
> >
> > > > > > > strictly prohibited. If you have received this e-mail
> message
> > in
> >
> > > > > > error,
> >
> > > > > > > please immediately notify the sender by reply message and
> then
> >
> > > > > delete
> >
> > > > > > the
> >
> > > > > > > electronic message and any attachments.
> >
> > > > > > >
> >
> > > > > >
> >
> > > > > >
> >
> > > >
> > **********************************************************************
> >
> > > > > > This e-mail message and any attachments contain confidential
> >
> > > > > information
> >
> > > > > > from Medco. If you are not the intended recipient, you are
> > hereby
> >
> > > > > notified
> >
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
> > of
> >
> > > > any
> >
> > > > > > action in reliance on the contents of this electronic
> > information
> >
> > > is
> >
> > > > > > strictly prohibited. If you have received this e-mail message
> in
> >
> > > > > error,
> >
> > > > > > please immediately notify the sender by reply message and then
> >
> > > > delete
> >
> > > > > the
> >
> > > > > > electronic message and any attachments.
> >
> > > > > >
> >
> > > > > >
> >
> > > >
> > ---------------------------------------------------------------------
> >
> > > > > > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@logging.apache.org
> >
> > > > > > For additional commands, e-mail:
> >
> > > log4j-user-help@logging.apache.org
> >
> > > > > >
> >
> > > > > >
> >
> > > > >
> >
> > > > >
> >
> > >
> **********************************************************************
> >
> > > > > This e-mail message and any attachments contain confidential
> >
> > > > information
> >
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> >
> > > > notified
> >
> > > > > that disclosure, printing, copying, distribution, or the taking
> of
> >
> > > any
> >
> > > > > action in reliance on the contents of this electronic
> information
> > is
> >
> > > > > strictly prohibited. If you have received this e-mail message in
> >
> > > > error,
> >
> > > > > please immediately notify the sender by reply message and then
> >
> > > delete
> >
> > > > the
> >
> > > > > electronic message and any attachments.
> >
> > > > >
> >
> > > > >
> >
> > >
> ---------------------------------------------------------------------
> >
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> >
> > > > > For additional commands, e-mail:
> > log4j-user-help@logging.apache.org
> >
> > > > >
> >
> > > > >
> >
> > > >
> >
> > > >
> > **********************************************************************
> >
> > > > This e-mail message and any attachments contain confidential
> >
> > > information
> >
> > > > from Medco. If you are not the intended recipient, you are hereby
> >
> > > notified
> >
> > > > that disclosure, printing, copying, distribution, or the taking of
> > any
> >
> > > > action in reliance on the contents of this electronic information
> is
> >
> > > > strictly prohibited. If you have received this e-mail message in
> >
> > > error,
> >
> > > > please immediately notify the sender by reply message and then
> > delete
> >
> > > the
> >
> > > > electronic message and any attachments.
> >
> > > >
> >
> > > >
> > ---------------------------------------------------------------------
> >
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> >
> > > >
> >
> > > >
> >
> > >
> >
> > >
> **********************************************************************
> >
> > > This e-mail message and any attachments contain confidential
> > information
> >
> > > from Medco. If you are not the intended recipient, you are hereby
> >
> > > notified that disclosure, printing, copying, distribution, or the
> > taking
> >
> > > of any action in reliance on the contents of this electronic
> > information
> >
> > > is strictly prohibited. If you have received this e-mail message in
> >
> > > error, please immediately notify the sender by reply message and
> then
> >
> > > delete the electronic message and any attachments.
> >
> > >
> >
> > >
> ---------------------------------------------------------------------
> >
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> > >
> >
> > >
> **********************************************************************
> >
> > > This e-mail message and any attachments contain confidential
> > information
> >
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> >
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> >
> > > action in reliance on the contents of this electronic information is
> >
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> >
> > > please immediately notify the sender by reply message and then
> delete
> > the
> >
> > > electronic message and any attachments.
> >
> > >
> >
> > >
> ---------------------------------------------------------------------
> >
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> > >
> >
> > >
> >
> > **********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then delete
> the
> > electronic message and any attachments.
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby
> notified that disclosure, printing, copying, distribution, or the taking
> of any action in reliance on the contents of this electronic information
> is strictly prohibited. If you have received this e-mail message in
> error, please immediately notify the sender by reply message and then
> delete the electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in error,
> please immediately notify the sender by reply message and then delete the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
Just adding to last post , I am using log4j1.2.16 which is the one used
by chainsaw application too...

-----Original Message-----
From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com] 
Sent: Friday, September 16, 2011 3:26 PM
To: Log4J Users List
Subject: RE: log4j----Edit the event received

Even for me it is working on chainsaw side.
But if I have this on my application side where I define SocketAppender
, it is not working, I included components ,extras and receivers jars.


Thank U,
VGSS

-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Friday, September 16, 2011 3:03 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

I just tried this and it worked fine....I modified the Chainsaw config
file
I was using (anything received by Chainsaw can also be sent to appenders
defined in the same config)...configuration and example log file output
below:

Here's what I added to the Chainsaw config file:
   <appender name="F1" class="org.apache.log4j.FileAppender">
       <param name="file" value="c:/temp/file.txt"/>
       <param name="append" value="false"/>
       <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
p2:%X{p2}
%m%n"/>
       </layout>
     </appender>


     <appender name="A1"
class="org.apache.log4j.rewrite.RewriteAppender">
       <appender-ref ref="F1"/>
       <rewritePolicy
class="org.apache.log4j.rewrite.PropertyRewritePolicy">
         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
       </rewritePolicy>
     </appender>

   <root>
      <level value="debug"/>
       <appender-ref ref="A1" />
    </root>

And here is an example output line:
DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE   RI-
RI.DRI
 FATAL ERROR WARNING INFO


On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

> I tried this, its not working, following are warnings I get
>
>
>
>
>
> log4j:WARN Continuable parsing error 48 and column 80
>
> log4j:WARN Element type "rewritePolicy" must be declared.
>
> log4j:WARN Continuable parsing error 52 and column 14
>
> log4j:WARN The content of element type "appender" must match
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> ?,layout?,filter*,appender-ref*)".
>
>
>
>
>
> Adding an Appender to RewriteAppender is working fine, but assigning
> rewritePolicy to a RewriteAppender is failing.
>
>
>
>
>
> Thank U,
>
> VGSS
>
>
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Friday, September 16, 2011 1:48 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
>
>
> Here is an example from the tests in log4j:
>
>
>
>
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
>
c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> ev=564831
>
>
>
>     <appender name="F1" class="org.apache.log4j.FileAppender">
>
>       <param name="file" value="temp"/>
>
>       <param name="append" value="false"/>
>
>       <layout class="org.apache.log4j.PatternLayout">
>
>         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> p2:%X{p2}
>
> %m%n"/>
>
>       </layout>
>
>     </appender>
>
>
>
>
>
>     <appender name="A1"
> class="org.apache.log4j.rewrite.RewriteAppender">
>
>       <appender-ref ref="F1"/>
>
>       <rewritePolicy
>
> class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>
>         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
>
>       </rewritePolicy>
>
>     </appender>
>
>
>
>     <root>
>
>       <level value ="debug" />
>
>       <appender-ref ref="A1" />
>
>     </root>
>
>
>
> On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
>
> <Ge...@medco.com>wrote:
>
>
>
> > Would any one please give an example of xml configuration file with
>
> > Rewrite Appender.
>
> >
>
> > Thank U,
>
> > Vgss
>
> >
>
> > -----Original Message-----
>
> > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
>
> > Sent: Thursday, September 15, 2011 1:57 PM
>
> > To: Log4J Users List
>
> > Subject: RE: log4j----Edit the event received
>
> >
>
> > log4j: Trying to find [server2Rewritelog4j.xml] using context
>
> > classloader sun.misc.Launcher$AppClassLoader@601bb1.
>
> > log4j: Using URL
>
> > [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> for
>
> > automatic log4j configuration.
>
> > log4j: Preferred configurator class:
>
> > org.apache.log4j.xml.DOMConfigurator
>
> > log4j: System property is :null
>
> > log4j: Standard DocumentBuilderFactory search succeded.
>
> > log4j: DocumentBuilderFactory is:
>
> > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
>
> > log4j:WARN Continuable parsing error 19 and column 97
>
> > log4j:WARN Element type "rewritePolicy" must be declared.
>
> > log4j:WARN Continuable parsing error 22 and column 12
>
> > log4j:WARN The content of element type "appender" must match
>
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
>
> > ?,layout?,filter*,appender-ref*)".
>
> > log4j: debug attribute= "null".
>
> > log4j: Ignoring debug attribute.
>
> > log4j: reset attribute= "false".
>
> > log4j: Threshold ="null".
>
> > log4j: Level value for root is  [debug].
>
> > log4j: root level set to DEBUG
>
> > log4j: Class name: [org.apache.log4j.ConsoleAppender]
>
> > log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
>
> > log4j: Setting property [conversionPattern] to [[%d{ISO8601} %t %c]
>
> > %m%n].
>
> > log4j: Adding appender named [CA] to category [root]
>
> >
>
> > -----Original Message-----
>
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > Sent: Thursday, September 15, 2011 1:54 PM
>
> > To: Log4J Users List
>
> > Subject: Re: log4j----Edit the event received
>
> >
>
> > There is a DTD for core elements but alternate elements can be added
>
> > (like
>
> > rewritepolicy)...you won't find rewritepolicy in the DTD.
>
> >
>
> > Can you add -Dlog4j.debug=true to your appender-side java command,
and
>
> > paste
>
> > the output?
>
> >
>
> > Thanks
>
> >
>
> > Scott
>
> >
>
> > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
>
> > <Ge...@medco.com>wrote:
>
> >
>
> > > Where can I find XMLschema file for log4j XML configuration
file????
>
> > >
>
> > >
>
> > > Thank U,
>
> > > VGSS
>
> > >
>
> > > -----Original Message-----
>
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > > Sent: Wednesday, September 14, 2011 4:51 PM
>
> > > To: Log4J Users List
>
> > > Subject: Re: log4j----Edit the event received
>
> > >
>
> > > Missed the end param on the nested properties param...not sure
about
>
> > > case of
>
> > > RewritePolicy node name..may be rewritePolicy.
>
> > >
>
> > > <appender name="rewrite"
>
> > > class="org.apache.log4j.rewrite.RewriteAppender">
>
> > >    <appender name="socket"
>
> > class="org.apache.log4j.net.SocketAppender">
>
> > >      <param name="Port" value="12346"/>
>
> > >      <param name="RemoteHost" value="localhost"/>
>
> > >      <param name="Application" value="app1"/>
>
> > >      <param name="ReconnectionDelay" value="60000"/>
>
> > >      <param name="Threshold" value="ALL"/>
>
> > >    </appender>
>
> > >    <RewritePolicy name="propertyPolicy"
>
> > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>
> > >        <param name="properties"
>
> > >
>
> >
>
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
>
> > > tyvalue2"/>
>
> > >    </RewritePolicy>
>
> > > </appender>
>
> > >
>
> > >
>
> > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
>
> > > <Ge...@medco.com>wrote:
>
> > >
>
> > > > Thank U...
>
> > > >
>
> > > > -----Original Message-----
>
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > > > Sent: Wednesday, September 14, 2011 4:31 PM
>
> > > > To: Log4J Users List
>
> > > > Subject: Re: log4j----Edit the event received
>
> > > >
>
> > > > remoteSourceInfo contains the connected port:
>
> > > >
>
> > > > hostName = socket.getInetAddress().getHostName();
>
> > > > remoteInfo = hostName + ":" + socket.getPort();
>
> > > >
>
> > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
>
> > > > <Ge...@medco.com>wrote:
>
> > > >
>
> > > > > yes, I got them
>
> > > > >
>
> > > > > how are "hostname" and " log4j.remoteSourceInfo"  different
from
>
> > > each
>
> > > > > other....
>
> > > > >
>
> > > > > thank U
>
> > > > > VGSS
>
> > > > >
>
> > > > >
>
> > > > > -----Original Message-----
>
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > > > > Sent: Wednesday, September 14, 2011 4:15 PM
>
> > > > > To: Log4J Users List
>
> > > > > Subject: Re: log4j----Edit the event received
>
> > > > >
>
> > > > > The SocketReceiver adds two properties to each event:
>
> > > > > hostname
>
> > > > > log4j.remoteSourceInfo
>
> > > > >
>
> > > > > With the developer snapshot of Chainsaw you should see those
as
>
> > > > > individual
>
> > > > > columns in the table.  If they aren't displayed by default you
> can
>
> > > > > enable
>
> > > > > them via the tab preferences menu (select Columns).
>
> > > > >
>
> > > > > Scott
>
> > > > >
>
> > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
>
> > > > > <Ge...@medco.com>wrote:
>
> > > > >
>
> > > > > > Hi,
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >  What I am looking for is, every event received by
>
> > SocketAppender,
>
> > > > > even
>
> > > > > > before it send to remote machine, it must append  to the
>
> > event(on
>
> > > > > which
>
> > > > > > log4j is running).
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >  Can any one please tell me a solution for this.
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > > Example: if application(running on machine HOSTNAME) logs
>
> > message
>
> > > "I
>
> > > > > am
>
> > > > > > a Logging event", than SOCKET APPENDER must send following
to
>
> > > REMOTE
>
> > > > > > machine(or SOCKET RECEIVER on Remote machine should receive
>
> > > > following
>
> > > > > as
>
> > > > > > log message).
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > > "HOSTNAME:I am a Logging event"
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > > Thank U,
>
> > > > > >
>
> > > > > > VGSS
>
> > > > > >
>
> > > > > >
>
> > > >
>
> >
**********************************************************************
>
> > > > > > This e-mail message and any attachments contain confidential
>
> > > > > information
>
> > > > > > from Medco. If you are not the intended recipient, you are
>
> > hereby
>
> > > > > notified
>
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
>
> > of
>
> > > > any
>
> > > > > > action in reliance on the contents of this electronic
>
> > information
>
> > > is
>
> > > > > > strictly prohibited. If you have received this e-mail
message
> in
>
> > > > > error,
>
> > > > > > please immediately notify the sender by reply message and
then
>
> > > > delete
>
> > > > > the
>
> > > > > > electronic message and any attachments.
>
> > > > > >
>
> > > > >
>
> > > > >
>
> > >
> **********************************************************************
>
> > > > > This e-mail message and any attachments contain confidential
>
> > > > information
>
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
>
> > > > notified
>
> > > > > that disclosure, printing, copying, distribution, or the
taking
> of
>
> > > any
>
> > > > > action in reliance on the contents of this electronic
> information
>
> > is
>
> > > > > strictly prohibited. If you have received this e-mail message
in
>
> > > > error,
>
> > > > > please immediately notify the sender by reply message and then
>
> > > delete
>
> > > > the
>
> > > > > electronic message and any attachments.
>
> > > > >
>
> > > > >
>
> > >
> ---------------------------------------------------------------------
>
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
>
> > > > > For additional commands, e-mail:
>
> > log4j-user-help@logging.apache.org
>
> > > > >
>
> > > > >
>
> > > >
>
> > > >
>
> >
**********************************************************************
>
> > > > This e-mail message and any attachments contain confidential
>
> > > information
>
> > > > from Medco. If you are not the intended recipient, you are
hereby
>
> > > notified
>
> > > > that disclosure, printing, copying, distribution, or the taking
of
>
> > any
>
> > > > action in reliance on the contents of this electronic
information
> is
>
> > > > strictly prohibited. If you have received this e-mail message in
>
> > > error,
>
> > > > please immediately notify the sender by reply message and then
>
> > delete
>
> > > the
>
> > > > electronic message and any attachments.
>
> > > >
>
> > > >
>
> >
---------------------------------------------------------------------
>
> > > > To unsubscribe, e-mail:
log4j-user-unsubscribe@logging.apache.org
>
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
>
> > > >
>
> > > >
>
> > >
>
> > >
> **********************************************************************
>
> > > This e-mail message and any attachments contain confidential
>
> > information
>
> > > from Medco. If you are not the intended recipient, you are hereby
>
> > notified
>
> > > that disclosure, printing, copying, distribution, or the taking of
> any
>
> > > action in reliance on the contents of this electronic information
is
>
> > > strictly prohibited. If you have received this e-mail message in
>
> > error,
>
> > > please immediately notify the sender by reply message and then
> delete
>
> > the
>
> > > electronic message and any attachments.
>
> > >
>
> > >
> ---------------------------------------------------------------------
>
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>
> > > For additional commands, e-mail:
log4j-user-help@logging.apache.org
>
> > >
>
> > >
>
> >
>
> >
**********************************************************************
>
> > This e-mail message and any attachments contain confidential
> information
>
> > from Medco. If you are not the intended recipient, you are hereby
>
> > notified that disclosure, printing, copying, distribution, or the
> taking
>
> > of any action in reliance on the contents of this electronic
> information
>
> > is strictly prohibited. If you have received this e-mail message in
>
> > error, please immediately notify the sender by reply message and
then
>
> > delete the electronic message and any attachments.
>
> >
>
> >
---------------------------------------------------------------------
>
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> >
>
> >
**********************************************************************
>
> > This e-mail message and any attachments contain confidential
> information
>
> > from Medco. If you are not the intended recipient, you are hereby
> notified
>
> > that disclosure, printing, copying, distribution, or the taking of
any
>
> > action in reliance on the contents of this electronic information is
>
> > strictly prohibited. If you have received this e-mail message in
> error,
>
> > please immediately notify the sender by reply message and then
delete
> the
>
> > electronic message and any attachments.
>
> >
>
> >
---------------------------------------------------------------------
>
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> >
>
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>

**********************************************************************
This e-mail message and any attachments contain confidential information
from Medco. If you are not the intended recipient, you are hereby
notified that disclosure, printing, copying, distribution, or the taking
of any action in reliance on the contents of this electronic information
is strictly prohibited. If you have received this e-mail message in
error, please immediately notify the sender by reply message and then
delete the electronic message and any attachments.

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

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
Even for me it is working on chainsaw side.
But if I have this on my application side where I define SocketAppender
, it is not working, I included components ,extras and receivers jars.


Thank U,
VGSS

-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Friday, September 16, 2011 3:03 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

I just tried this and it worked fine....I modified the Chainsaw config
file
I was using (anything received by Chainsaw can also be sent to appenders
defined in the same config)...configuration and example log file output
below:

Here's what I added to the Chainsaw config file:
   <appender name="F1" class="org.apache.log4j.FileAppender">
       <param name="file" value="c:/temp/file.txt"/>
       <param name="append" value="false"/>
       <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
p2:%X{p2}
%m%n"/>
       </layout>
     </appender>


     <appender name="A1"
class="org.apache.log4j.rewrite.RewriteAppender">
       <appender-ref ref="F1"/>
       <rewritePolicy
class="org.apache.log4j.rewrite.PropertyRewritePolicy">
         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
       </rewritePolicy>
     </appender>

   <root>
      <level value="debug"/>
       <appender-ref ref="A1" />
    </root>

And here is an example output line:
DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE   RI-
RI.DRI
 FATAL ERROR WARNING INFO


On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

> I tried this, its not working, following are warnings I get
>
>
>
>
>
> log4j:WARN Continuable parsing error 48 and column 80
>
> log4j:WARN Element type "rewritePolicy" must be declared.
>
> log4j:WARN Continuable parsing error 52 and column 14
>
> log4j:WARN The content of element type "appender" must match
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> ?,layout?,filter*,appender-ref*)".
>
>
>
>
>
> Adding an Appender to RewriteAppender is working fine, but assigning
> rewritePolicy to a RewriteAppender is failing.
>
>
>
>
>
> Thank U,
>
> VGSS
>
>
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Friday, September 16, 2011 1:48 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
>
>
> Here is an example from the tests in log4j:
>
>
>
>
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
>
c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> ev=564831
>
>
>
>     <appender name="F1" class="org.apache.log4j.FileAppender">
>
>       <param name="file" value="temp"/>
>
>       <param name="append" value="false"/>
>
>       <layout class="org.apache.log4j.PatternLayout">
>
>         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> p2:%X{p2}
>
> %m%n"/>
>
>       </layout>
>
>     </appender>
>
>
>
>
>
>     <appender name="A1"
> class="org.apache.log4j.rewrite.RewriteAppender">
>
>       <appender-ref ref="F1"/>
>
>       <rewritePolicy
>
> class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>
>         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
>
>       </rewritePolicy>
>
>     </appender>
>
>
>
>     <root>
>
>       <level value ="debug" />
>
>       <appender-ref ref="A1" />
>
>     </root>
>
>
>
> On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
>
> <Ge...@medco.com>wrote:
>
>
>
> > Would any one please give an example of xml configuration file with
>
> > Rewrite Appender.
>
> >
>
> > Thank U,
>
> > Vgss
>
> >
>
> > -----Original Message-----
>
> > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
>
> > Sent: Thursday, September 15, 2011 1:57 PM
>
> > To: Log4J Users List
>
> > Subject: RE: log4j----Edit the event received
>
> >
>
> > log4j: Trying to find [server2Rewritelog4j.xml] using context
>
> > classloader sun.misc.Launcher$AppClassLoader@601bb1.
>
> > log4j: Using URL
>
> > [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> for
>
> > automatic log4j configuration.
>
> > log4j: Preferred configurator class:
>
> > org.apache.log4j.xml.DOMConfigurator
>
> > log4j: System property is :null
>
> > log4j: Standard DocumentBuilderFactory search succeded.
>
> > log4j: DocumentBuilderFactory is:
>
> > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
>
> > log4j:WARN Continuable parsing error 19 and column 97
>
> > log4j:WARN Element type "rewritePolicy" must be declared.
>
> > log4j:WARN Continuable parsing error 22 and column 12
>
> > log4j:WARN The content of element type "appender" must match
>
> >
>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
>
> > ?,layout?,filter*,appender-ref*)".
>
> > log4j: debug attribute= "null".
>
> > log4j: Ignoring debug attribute.
>
> > log4j: reset attribute= "false".
>
> > log4j: Threshold ="null".
>
> > log4j: Level value for root is  [debug].
>
> > log4j: root level set to DEBUG
>
> > log4j: Class name: [org.apache.log4j.ConsoleAppender]
>
> > log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
>
> > log4j: Setting property [conversionPattern] to [[%d{ISO8601} %t %c]
>
> > %m%n].
>
> > log4j: Adding appender named [CA] to category [root]
>
> >
>
> > -----Original Message-----
>
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > Sent: Thursday, September 15, 2011 1:54 PM
>
> > To: Log4J Users List
>
> > Subject: Re: log4j----Edit the event received
>
> >
>
> > There is a DTD for core elements but alternate elements can be added
>
> > (like
>
> > rewritepolicy)...you won't find rewritepolicy in the DTD.
>
> >
>
> > Can you add -Dlog4j.debug=true to your appender-side java command,
and
>
> > paste
>
> > the output?
>
> >
>
> > Thanks
>
> >
>
> > Scott
>
> >
>
> > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
>
> > <Ge...@medco.com>wrote:
>
> >
>
> > > Where can I find XMLschema file for log4j XML configuration
file????
>
> > >
>
> > >
>
> > > Thank U,
>
> > > VGSS
>
> > >
>
> > > -----Original Message-----
>
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > > Sent: Wednesday, September 14, 2011 4:51 PM
>
> > > To: Log4J Users List
>
> > > Subject: Re: log4j----Edit the event received
>
> > >
>
> > > Missed the end param on the nested properties param...not sure
about
>
> > > case of
>
> > > RewritePolicy node name..may be rewritePolicy.
>
> > >
>
> > > <appender name="rewrite"
>
> > > class="org.apache.log4j.rewrite.RewriteAppender">
>
> > >    <appender name="socket"
>
> > class="org.apache.log4j.net.SocketAppender">
>
> > >      <param name="Port" value="12346"/>
>
> > >      <param name="RemoteHost" value="localhost"/>
>
> > >      <param name="Application" value="app1"/>
>
> > >      <param name="ReconnectionDelay" value="60000"/>
>
> > >      <param name="Threshold" value="ALL"/>
>
> > >    </appender>
>
> > >    <RewritePolicy name="propertyPolicy"
>
> > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>
> > >        <param name="properties"
>
> > >
>
> >
>
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
>
> > > tyvalue2"/>
>
> > >    </RewritePolicy>
>
> > > </appender>
>
> > >
>
> > >
>
> > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
>
> > > <Ge...@medco.com>wrote:
>
> > >
>
> > > > Thank U...
>
> > > >
>
> > > > -----Original Message-----
>
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > > > Sent: Wednesday, September 14, 2011 4:31 PM
>
> > > > To: Log4J Users List
>
> > > > Subject: Re: log4j----Edit the event received
>
> > > >
>
> > > > remoteSourceInfo contains the connected port:
>
> > > >
>
> > > > hostName = socket.getInetAddress().getHostName();
>
> > > > remoteInfo = hostName + ":" + socket.getPort();
>
> > > >
>
> > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
>
> > > > <Ge...@medco.com>wrote:
>
> > > >
>
> > > > > yes, I got them
>
> > > > >
>
> > > > > how are "hostname" and " log4j.remoteSourceInfo"  different
from
>
> > > each
>
> > > > > other....
>
> > > > >
>
> > > > > thank U
>
> > > > > VGSS
>
> > > > >
>
> > > > >
>
> > > > > -----Original Message-----
>
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > > > > Sent: Wednesday, September 14, 2011 4:15 PM
>
> > > > > To: Log4J Users List
>
> > > > > Subject: Re: log4j----Edit the event received
>
> > > > >
>
> > > > > The SocketReceiver adds two properties to each event:
>
> > > > > hostname
>
> > > > > log4j.remoteSourceInfo
>
> > > > >
>
> > > > > With the developer snapshot of Chainsaw you should see those
as
>
> > > > > individual
>
> > > > > columns in the table.  If they aren't displayed by default you
> can
>
> > > > > enable
>
> > > > > them via the tab preferences menu (select Columns).
>
> > > > >
>
> > > > > Scott
>
> > > > >
>
> > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
>
> > > > > <Ge...@medco.com>wrote:
>
> > > > >
>
> > > > > > Hi,
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >  What I am looking for is, every event received by
>
> > SocketAppender,
>
> > > > > even
>
> > > > > > before it send to remote machine, it must append  to the
>
> > event(on
>
> > > > > which
>
> > > > > > log4j is running).
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >  Can any one please tell me a solution for this.
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > > Example: if application(running on machine HOSTNAME) logs
>
> > message
>
> > > "I
>
> > > > > am
>
> > > > > > a Logging event", than SOCKET APPENDER must send following
to
>
> > > REMOTE
>
> > > > > > machine(or SOCKET RECEIVER on Remote machine should receive
>
> > > > following
>
> > > > > as
>
> > > > > > log message).
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > > "HOSTNAME:I am a Logging event"
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > > Thank U,
>
> > > > > >
>
> > > > > > VGSS
>
> > > > > >
>
> > > > > >
>
> > > >
>
> >
**********************************************************************
>
> > > > > > This e-mail message and any attachments contain confidential
>
> > > > > information
>
> > > > > > from Medco. If you are not the intended recipient, you are
>
> > hereby
>
> > > > > notified
>
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
>
> > of
>
> > > > any
>
> > > > > > action in reliance on the contents of this electronic
>
> > information
>
> > > is
>
> > > > > > strictly prohibited. If you have received this e-mail
message
> in
>
> > > > > error,
>
> > > > > > please immediately notify the sender by reply message and
then
>
> > > > delete
>
> > > > > the
>
> > > > > > electronic message and any attachments.
>
> > > > > >
>
> > > > >
>
> > > > >
>
> > >
> **********************************************************************
>
> > > > > This e-mail message and any attachments contain confidential
>
> > > > information
>
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
>
> > > > notified
>
> > > > > that disclosure, printing, copying, distribution, or the
taking
> of
>
> > > any
>
> > > > > action in reliance on the contents of this electronic
> information
>
> > is
>
> > > > > strictly prohibited. If you have received this e-mail message
in
>
> > > > error,
>
> > > > > please immediately notify the sender by reply message and then
>
> > > delete
>
> > > > the
>
> > > > > electronic message and any attachments.
>
> > > > >
>
> > > > >
>
> > >
> ---------------------------------------------------------------------
>
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
>
> > > > > For additional commands, e-mail:
>
> > log4j-user-help@logging.apache.org
>
> > > > >
>
> > > > >
>
> > > >
>
> > > >
>
> >
**********************************************************************
>
> > > > This e-mail message and any attachments contain confidential
>
> > > information
>
> > > > from Medco. If you are not the intended recipient, you are
hereby
>
> > > notified
>
> > > > that disclosure, printing, copying, distribution, or the taking
of
>
> > any
>
> > > > action in reliance on the contents of this electronic
information
> is
>
> > > > strictly prohibited. If you have received this e-mail message in
>
> > > error,
>
> > > > please immediately notify the sender by reply message and then
>
> > delete
>
> > > the
>
> > > > electronic message and any attachments.
>
> > > >
>
> > > >
>
> >
---------------------------------------------------------------------
>
> > > > To unsubscribe, e-mail:
log4j-user-unsubscribe@logging.apache.org
>
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
>
> > > >
>
> > > >
>
> > >
>
> > >
> **********************************************************************
>
> > > This e-mail message and any attachments contain confidential
>
> > information
>
> > > from Medco. If you are not the intended recipient, you are hereby
>
> > notified
>
> > > that disclosure, printing, copying, distribution, or the taking of
> any
>
> > > action in reliance on the contents of this electronic information
is
>
> > > strictly prohibited. If you have received this e-mail message in
>
> > error,
>
> > > please immediately notify the sender by reply message and then
> delete
>
> > the
>
> > > electronic message and any attachments.
>
> > >
>
> > >
> ---------------------------------------------------------------------
>
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>
> > > For additional commands, e-mail:
log4j-user-help@logging.apache.org
>
> > >
>
> > >
>
> >
>
> >
**********************************************************************
>
> > This e-mail message and any attachments contain confidential
> information
>
> > from Medco. If you are not the intended recipient, you are hereby
>
> > notified that disclosure, printing, copying, distribution, or the
> taking
>
> > of any action in reliance on the contents of this electronic
> information
>
> > is strictly prohibited. If you have received this e-mail message in
>
> > error, please immediately notify the sender by reply message and
then
>
> > delete the electronic message and any attachments.
>
> >
>
> >
---------------------------------------------------------------------
>
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> >
>
> >
**********************************************************************
>
> > This e-mail message and any attachments contain confidential
> information
>
> > from Medco. If you are not the intended recipient, you are hereby
> notified
>
> > that disclosure, printing, copying, distribution, or the taking of
any
>
> > action in reliance on the contents of this electronic information is
>
> > strictly prohibited. If you have received this e-mail message in
> error,
>
> > please immediately notify the sender by reply message and then
delete
> the
>
> > electronic message and any attachments.
>
> >
>
> >
---------------------------------------------------------------------
>
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> >
>
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


Re: log4j----Edit the event received

Posted by Scott Deboy <sc...@gmail.com>.
I just tried this and it worked fine....I modified the Chainsaw config file
I was using (anything received by Chainsaw can also be sent to appenders
defined in the same config)...configuration and example log file output
below:

Here's what I added to the Chainsaw config file:
   <appender name="F1" class="org.apache.log4j.FileAppender">
       <param name="file" value="c:/temp/file.txt"/>
       <param name="append" value="false"/>
       <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern" value="%p %c - p1:%X{p1} p2:%X{p2}
%m%n"/>
       </layout>
     </appender>


     <appender name="A1" class="org.apache.log4j.rewrite.RewriteAppender">
       <appender-ref ref="F1"/>
       <rewritePolicy
class="org.apache.log4j.rewrite.PropertyRewritePolicy">
         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
       </rewritePolicy>
     </appender>

   <root>
      <level value="debug"/>
       <appender-ref ref="A1" />
    </root>

And here is an example output line:
DEBUG Unknown - p1:Hello p2:World 20110916 09:16:16.870 NOTICE   RI- RI.DRI
 FATAL ERROR WARNING INFO


On Fri, Sep 16, 2011 at 11:01 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

> I tried this, its not working, following are warnings I get
>
>
>
>
>
> log4j:WARN Continuable parsing error 48 and column 80
>
> log4j:WARN Element type "rewritePolicy" must be declared.
>
> log4j:WARN Continuable parsing error 52 and column 14
>
> log4j:WARN The content of element type "appender" must match
> "(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> ?,layout?,filter*,appender-ref*)".
>
>
>
>
>
> Adding an Appender to RewriteAppender is working fine, but assigning
> rewritePolicy to a RewriteAppender is failing.
>
>
>
>
>
> Thank U,
>
> VGSS
>
>
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Friday, September 16, 2011 1:48 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
>
>
> Here is an example from the tests in log4j:
>
>
>
> http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
> c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
> ev=564831
>
>
>
>     <appender name="F1" class="org.apache.log4j.FileAppender">
>
>       <param name="file" value="temp"/>
>
>       <param name="append" value="false"/>
>
>       <layout class="org.apache.log4j.PatternLayout">
>
>         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
> p2:%X{p2}
>
> %m%n"/>
>
>       </layout>
>
>     </appender>
>
>
>
>
>
>     <appender name="A1"
> class="org.apache.log4j.rewrite.RewriteAppender">
>
>       <appender-ref ref="F1"/>
>
>       <rewritePolicy
>
> class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>
>         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
>
>       </rewritePolicy>
>
>     </appender>
>
>
>
>     <root>
>
>       <level value ="debug" />
>
>       <appender-ref ref="A1" />
>
>     </root>
>
>
>
> On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
>
> <Ge...@medco.com>wrote:
>
>
>
> > Would any one please give an example of xml configuration file with
>
> > Rewrite Appender.
>
> >
>
> > Thank U,
>
> > Vgss
>
> >
>
> > -----Original Message-----
>
> > From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
>
> > Sent: Thursday, September 15, 2011 1:57 PM
>
> > To: Log4J Users List
>
> > Subject: RE: log4j----Edit the event received
>
> >
>
> > log4j: Trying to find [server2Rewritelog4j.xml] using context
>
> > classloader sun.misc.Launcher$AppClassLoader@601bb1.
>
> > log4j: Using URL
>
> > [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
> for
>
> > automatic log4j configuration.
>
> > log4j: Preferred configurator class:
>
> > org.apache.log4j.xml.DOMConfigurator
>
> > log4j: System property is :null
>
> > log4j: Standard DocumentBuilderFactory search succeded.
>
> > log4j: DocumentBuilderFactory is:
>
> > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
>
> > log4j:WARN Continuable parsing error 19 and column 97
>
> > log4j:WARN Element type "rewritePolicy" must be declared.
>
> > log4j:WARN Continuable parsing error 22 and column 12
>
> > log4j:WARN The content of element type "appender" must match
>
> >
> "(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
>
> > ?,layout?,filter*,appender-ref*)".
>
> > log4j: debug attribute= "null".
>
> > log4j: Ignoring debug attribute.
>
> > log4j: reset attribute= "false".
>
> > log4j: Threshold ="null".
>
> > log4j: Level value for root is  [debug].
>
> > log4j: root level set to DEBUG
>
> > log4j: Class name: [org.apache.log4j.ConsoleAppender]
>
> > log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
>
> > log4j: Setting property [conversionPattern] to [[%d{ISO8601} %t %c]
>
> > %m%n].
>
> > log4j: Adding appender named [CA] to category [root]
>
> >
>
> > -----Original Message-----
>
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > Sent: Thursday, September 15, 2011 1:54 PM
>
> > To: Log4J Users List
>
> > Subject: Re: log4j----Edit the event received
>
> >
>
> > There is a DTD for core elements but alternate elements can be added
>
> > (like
>
> > rewritepolicy)...you won't find rewritepolicy in the DTD.
>
> >
>
> > Can you add -Dlog4j.debug=true to your appender-side java command, and
>
> > paste
>
> > the output?
>
> >
>
> > Thanks
>
> >
>
> > Scott
>
> >
>
> > On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
>
> > <Ge...@medco.com>wrote:
>
> >
>
> > > Where can I find XMLschema file for log4j XML configuration file????
>
> > >
>
> > >
>
> > > Thank U,
>
> > > VGSS
>
> > >
>
> > > -----Original Message-----
>
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > > Sent: Wednesday, September 14, 2011 4:51 PM
>
> > > To: Log4J Users List
>
> > > Subject: Re: log4j----Edit the event received
>
> > >
>
> > > Missed the end param on the nested properties param...not sure about
>
> > > case of
>
> > > RewritePolicy node name..may be rewritePolicy.
>
> > >
>
> > > <appender name="rewrite"
>
> > > class="org.apache.log4j.rewrite.RewriteAppender">
>
> > >    <appender name="socket"
>
> > class="org.apache.log4j.net.SocketAppender">
>
> > >      <param name="Port" value="12346"/>
>
> > >      <param name="RemoteHost" value="localhost"/>
>
> > >      <param name="Application" value="app1"/>
>
> > >      <param name="ReconnectionDelay" value="60000"/>
>
> > >      <param name="Threshold" value="ALL"/>
>
> > >    </appender>
>
> > >    <RewritePolicy name="propertyPolicy"
>
> > > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>
> > >        <param name="properties"
>
> > >
>
> >
> value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
>
> > > tyvalue2"/>
>
> > >    </RewritePolicy>
>
> > > </appender>
>
> > >
>
> > >
>
> > > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
>
> > > <Ge...@medco.com>wrote:
>
> > >
>
> > > > Thank U...
>
> > > >
>
> > > > -----Original Message-----
>
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > > > Sent: Wednesday, September 14, 2011 4:31 PM
>
> > > > To: Log4J Users List
>
> > > > Subject: Re: log4j----Edit the event received
>
> > > >
>
> > > > remoteSourceInfo contains the connected port:
>
> > > >
>
> > > > hostName = socket.getInetAddress().getHostName();
>
> > > > remoteInfo = hostName + ":" + socket.getPort();
>
> > > >
>
> > > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
>
> > > > <Ge...@medco.com>wrote:
>
> > > >
>
> > > > > yes, I got them
>
> > > > >
>
> > > > > how are "hostname" and " log4j.remoteSourceInfo"  different from
>
> > > each
>
> > > > > other....
>
> > > > >
>
> > > > > thank U
>
> > > > > VGSS
>
> > > > >
>
> > > > >
>
> > > > > -----Original Message-----
>
> > > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
>
> > > > > Sent: Wednesday, September 14, 2011 4:15 PM
>
> > > > > To: Log4J Users List
>
> > > > > Subject: Re: log4j----Edit the event received
>
> > > > >
>
> > > > > The SocketReceiver adds two properties to each event:
>
> > > > > hostname
>
> > > > > log4j.remoteSourceInfo
>
> > > > >
>
> > > > > With the developer snapshot of Chainsaw you should see those as
>
> > > > > individual
>
> > > > > columns in the table.  If they aren't displayed by default you
> can
>
> > > > > enable
>
> > > > > them via the tab preferences menu (select Columns).
>
> > > > >
>
> > > > > Scott
>
> > > > >
>
> > > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
>
> > > > > <Ge...@medco.com>wrote:
>
> > > > >
>
> > > > > > Hi,
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >  What I am looking for is, every event received by
>
> > SocketAppender,
>
> > > > > even
>
> > > > > > before it send to remote machine, it must append  to the
>
> > event(on
>
> > > > > which
>
> > > > > > log4j is running).
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >  Can any one please tell me a solution for this.
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > > Example: if application(running on machine HOSTNAME) logs
>
> > message
>
> > > "I
>
> > > > > am
>
> > > > > > a Logging event", than SOCKET APPENDER must send following to
>
> > > REMOTE
>
> > > > > > machine(or SOCKET RECEIVER on Remote machine should receive
>
> > > > following
>
> > > > > as
>
> > > > > > log message).
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > > "HOSTNAME:I am a Logging event"
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > >
>
> > > > > > Thank U,
>
> > > > > >
>
> > > > > > VGSS
>
> > > > > >
>
> > > > > >
>
> > > >
>
> > **********************************************************************
>
> > > > > > This e-mail message and any attachments contain confidential
>
> > > > > information
>
> > > > > > from Medco. If you are not the intended recipient, you are
>
> > hereby
>
> > > > > notified
>
> > > > > > that disclosure, printing, copying, distribution, or the
> taking
>
> > of
>
> > > > any
>
> > > > > > action in reliance on the contents of this electronic
>
> > information
>
> > > is
>
> > > > > > strictly prohibited. If you have received this e-mail message
> in
>
> > > > > error,
>
> > > > > > please immediately notify the sender by reply message and then
>
> > > > delete
>
> > > > > the
>
> > > > > > electronic message and any attachments.
>
> > > > > >
>
> > > > >
>
> > > > >
>
> > >
> **********************************************************************
>
> > > > > This e-mail message and any attachments contain confidential
>
> > > > information
>
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
>
> > > > notified
>
> > > > > that disclosure, printing, copying, distribution, or the taking
> of
>
> > > any
>
> > > > > action in reliance on the contents of this electronic
> information
>
> > is
>
> > > > > strictly prohibited. If you have received this e-mail message in
>
> > > > error,
>
> > > > > please immediately notify the sender by reply message and then
>
> > > delete
>
> > > > the
>
> > > > > electronic message and any attachments.
>
> > > > >
>
> > > > >
>
> > >
> ---------------------------------------------------------------------
>
> > > > > To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
>
> > > > > For additional commands, e-mail:
>
> > log4j-user-help@logging.apache.org
>
> > > > >
>
> > > > >
>
> > > >
>
> > > >
>
> > **********************************************************************
>
> > > > This e-mail message and any attachments contain confidential
>
> > > information
>
> > > > from Medco. If you are not the intended recipient, you are hereby
>
> > > notified
>
> > > > that disclosure, printing, copying, distribution, or the taking of
>
> > any
>
> > > > action in reliance on the contents of this electronic information
> is
>
> > > > strictly prohibited. If you have received this e-mail message in
>
> > > error,
>
> > > > please immediately notify the sender by reply message and then
>
> > delete
>
> > > the
>
> > > > electronic message and any attachments.
>
> > > >
>
> > > >
>
> > ---------------------------------------------------------------------
>
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
>
> > > >
>
> > > >
>
> > >
>
> > >
> **********************************************************************
>
> > > This e-mail message and any attachments contain confidential
>
> > information
>
> > > from Medco. If you are not the intended recipient, you are hereby
>
> > notified
>
> > > that disclosure, printing, copying, distribution, or the taking of
> any
>
> > > action in reliance on the contents of this electronic information is
>
> > > strictly prohibited. If you have received this e-mail message in
>
> > error,
>
> > > please immediately notify the sender by reply message and then
> delete
>
> > the
>
> > > electronic message and any attachments.
>
> > >
>
> > >
> ---------------------------------------------------------------------
>
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> > >
>
> > >
>
> >
>
> > **********************************************************************
>
> > This e-mail message and any attachments contain confidential
> information
>
> > from Medco. If you are not the intended recipient, you are hereby
>
> > notified that disclosure, printing, copying, distribution, or the
> taking
>
> > of any action in reliance on the contents of this electronic
> information
>
> > is strictly prohibited. If you have received this e-mail message in
>
> > error, please immediately notify the sender by reply message and then
>
> > delete the electronic message and any attachments.
>
> >
>
> > ---------------------------------------------------------------------
>
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> >
>
> > **********************************************************************
>
> > This e-mail message and any attachments contain confidential
> information
>
> > from Medco. If you are not the intended recipient, you are hereby
> notified
>
> > that disclosure, printing, copying, distribution, or the taking of any
>
> > action in reliance on the contents of this electronic information is
>
> > strictly prohibited. If you have received this e-mail message in
> error,
>
> > please immediately notify the sender by reply message and then delete
> the
>
> > electronic message and any attachments.
>
> >
>
> > ---------------------------------------------------------------------
>
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> >
>
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in error,
> please immediately notify the sender by reply message and then delete the
> electronic message and any attachments.
>

RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
I tried this, its not working, following are warnings I get

 

 

log4j:WARN Continuable parsing error 48 and column 80

log4j:WARN Element type "rewritePolicy" must be declared.

log4j:WARN Continuable parsing error 52 and column 14

log4j:WARN The content of element type "appender" must match
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
?,layout?,filter*,appender-ref*)".

 

 

Adding an Appender to RewriteAppender is working fine, but assigning
rewritePolicy to a RewriteAppender is failing.

 

 

Thank U,

VGSS

 

-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Friday, September 16, 2011 1:48 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

 

Here is an example from the tests in log4j:

 

http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/sr
c/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathr
ev=564831

 

     <appender name="F1" class="org.apache.log4j.FileAppender">

       <param name="file" value="temp"/>

       <param name="append" value="false"/>

       <layout class="org.apache.log4j.PatternLayout">

         <param name="ConversionPattern" value="%p %c - p1:%X{p1}
p2:%X{p2}

%m%n"/>

       </layout>

     </appender>

 

 

     <appender name="A1"
class="org.apache.log4j.rewrite.RewriteAppender">

       <appender-ref ref="F1"/>

       <rewritePolicy

class="org.apache.log4j.rewrite.PropertyRewritePolicy">

         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>

       </rewritePolicy>

     </appender>

 

     <root>

       <level value ="debug" />

       <appender-ref ref="A1" />

     </root>

 

On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha

<Ge...@medco.com>wrote:

 

> Would any one please give an example of xml configuration file with

> Rewrite Appender.

> 

> Thank U,

> Vgss

> 

> -----Original Message-----

> From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]

> Sent: Thursday, September 15, 2011 1:57 PM

> To: Log4J Users List

> Subject: RE: log4j----Edit the event received

> 

> log4j: Trying to find [server2Rewritelog4j.xml] using context

> classloader sun.misc.Launcher$AppClassLoader@601bb1.

> log4j: Using URL

> [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml]
for

> automatic log4j configuration.

> log4j: Preferred configurator class:

> org.apache.log4j.xml.DOMConfigurator

> log4j: System property is :null

> log4j: Standard DocumentBuilderFactory search succeded.

> log4j: DocumentBuilderFactory is:

> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl

> log4j:WARN Continuable parsing error 19 and column 97

> log4j:WARN Element type "rewritePolicy" must be declared.

> log4j:WARN Continuable parsing error 22 and column 12

> log4j:WARN The content of element type "appender" must match

>
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource

> ?,layout?,filter*,appender-ref*)".

> log4j: debug attribute= "null".

> log4j: Ignoring debug attribute.

> log4j: reset attribute= "false".

> log4j: Threshold ="null".

> log4j: Level value for root is  [debug].

> log4j: root level set to DEBUG

> log4j: Class name: [org.apache.log4j.ConsoleAppender]

> log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"

> log4j: Setting property [conversionPattern] to [[%d{ISO8601} %t %c]

> %m%n].

> log4j: Adding appender named [CA] to category [root]

> 

> -----Original Message-----

> From: Scott Deboy [mailto:scott.deboy@gmail.com]

> Sent: Thursday, September 15, 2011 1:54 PM

> To: Log4J Users List

> Subject: Re: log4j----Edit the event received

> 

> There is a DTD for core elements but alternate elements can be added

> (like

> rewritepolicy)...you won't find rewritepolicy in the DTD.

> 

> Can you add -Dlog4j.debug=true to your appender-side java command, and

> paste

> the output?

> 

> Thanks

> 

> Scott

> 

> On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha

> <Ge...@medco.com>wrote:

> 

> > Where can I find XMLschema file for log4j XML configuration file????

> >

> >

> > Thank U,

> > VGSS

> >

> > -----Original Message-----

> > From: Scott Deboy [mailto:scott.deboy@gmail.com]

> > Sent: Wednesday, September 14, 2011 4:51 PM

> > To: Log4J Users List

> > Subject: Re: log4j----Edit the event received

> >

> > Missed the end param on the nested properties param...not sure about

> > case of

> > RewritePolicy node name..may be rewritePolicy.

> >

> > <appender name="rewrite"

> > class="org.apache.log4j.rewrite.RewriteAppender">

> >    <appender name="socket"

> class="org.apache.log4j.net.SocketAppender">

> >      <param name="Port" value="12346"/>

> >      <param name="RemoteHost" value="localhost"/>

> >      <param name="Application" value="app1"/>

> >      <param name="ReconnectionDelay" value="60000"/>

> >      <param name="Threshold" value="ALL"/>

> >    </appender>

> >    <RewritePolicy name="propertyPolicy"

> > class="org.apache.log4j.rewrite.PropertyRewritePolicy">

> >        <param name="properties"

> >

>
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper

> > tyvalue2"/>

> >    </RewritePolicy>

> > </appender>

> >

> >

> > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha

> > <Ge...@medco.com>wrote:

> >

> > > Thank U...

> > >

> > > -----Original Message-----

> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]

> > > Sent: Wednesday, September 14, 2011 4:31 PM

> > > To: Log4J Users List

> > > Subject: Re: log4j----Edit the event received

> > >

> > > remoteSourceInfo contains the connected port:

> > >

> > > hostName = socket.getInetAddress().getHostName();

> > > remoteInfo = hostName + ":" + socket.getPort();

> > >

> > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha

> > > <Ge...@medco.com>wrote:

> > >

> > > > yes, I got them

> > > >

> > > > how are "hostname" and " log4j.remoteSourceInfo"  different from

> > each

> > > > other....

> > > >

> > > > thank U

> > > > VGSS

> > > >

> > > >

> > > > -----Original Message-----

> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]

> > > > Sent: Wednesday, September 14, 2011 4:15 PM

> > > > To: Log4J Users List

> > > > Subject: Re: log4j----Edit the event received

> > > >

> > > > The SocketReceiver adds two properties to each event:

> > > > hostname

> > > > log4j.remoteSourceInfo

> > > >

> > > > With the developer snapshot of Chainsaw you should see those as

> > > > individual

> > > > columns in the table.  If they aren't displayed by default you
can

> > > > enable

> > > > them via the tab preferences menu (select Columns).

> > > >

> > > > Scott

> > > >

> > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha

> > > > <Ge...@medco.com>wrote:

> > > >

> > > > > Hi,

> > > > >

> > > > >

> > > > >

> > > > >  What I am looking for is, every event received by

> SocketAppender,

> > > > even

> > > > > before it send to remote machine, it must append  to the

> event(on

> > > > which

> > > > > log4j is running).

> > > > >

> > > > >

> > > > >

> > > > >  Can any one please tell me a solution for this.

> > > > >

> > > > >

> > > > >

> > > > > Example: if application(running on machine HOSTNAME) logs

> message

> > "I

> > > > am

> > > > > a Logging event", than SOCKET APPENDER must send following to

> > REMOTE

> > > > > machine(or SOCKET RECEIVER on Remote machine should receive

> > > following

> > > > as

> > > > > log message).

> > > > >

> > > > >

> > > > >

> > > > > "HOSTNAME:I am a Logging event"

> > > > >

> > > > >

> > > > >

> > > > >

> > > > >

> > > > >

> > > > >

> > > > >

> > > > >

> > > > >

> > > > >

> > > > >

> > > > >

> > > > > Thank U,

> > > > >

> > > > > VGSS

> > > > >

> > > > >

> > >

> **********************************************************************

> > > > > This e-mail message and any attachments contain confidential

> > > > information

> > > > > from Medco. If you are not the intended recipient, you are

> hereby

> > > > notified

> > > > > that disclosure, printing, copying, distribution, or the
taking

> of

> > > any

> > > > > action in reliance on the contents of this electronic

> information

> > is

> > > > > strictly prohibited. If you have received this e-mail message
in

> > > > error,

> > > > > please immediately notify the sender by reply message and then

> > > delete

> > > > the

> > > > > electronic message and any attachments.

> > > > >

> > > >

> > > >

> >
**********************************************************************

> > > > This e-mail message and any attachments contain confidential

> > > information

> > > > from Medco. If you are not the intended recipient, you are
hereby

> > > notified

> > > > that disclosure, printing, copying, distribution, or the taking
of

> > any

> > > > action in reliance on the contents of this electronic
information

> is

> > > > strictly prohibited. If you have received this e-mail message in

> > > error,

> > > > please immediately notify the sender by reply message and then

> > delete

> > > the

> > > > electronic message and any attachments.

> > > >

> > > >

> >
---------------------------------------------------------------------

> > > > To unsubscribe, e-mail:
log4j-user-unsubscribe@logging.apache.org

> > > > For additional commands, e-mail:

> log4j-user-help@logging.apache.org

> > > >

> > > >

> > >

> > >

> **********************************************************************

> > > This e-mail message and any attachments contain confidential

> > information

> > > from Medco. If you are not the intended recipient, you are hereby

> > notified

> > > that disclosure, printing, copying, distribution, or the taking of

> any

> > > action in reliance on the contents of this electronic information
is

> > > strictly prohibited. If you have received this e-mail message in

> > error,

> > > please immediately notify the sender by reply message and then

> delete

> > the

> > > electronic message and any attachments.

> > >

> > >

> ---------------------------------------------------------------------

> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org

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

> > >

> > >

> >

> >
**********************************************************************

> > This e-mail message and any attachments contain confidential

> information

> > from Medco. If you are not the intended recipient, you are hereby

> notified

> > that disclosure, printing, copying, distribution, or the taking of
any

> > action in reliance on the contents of this electronic information is

> > strictly prohibited. If you have received this e-mail message in

> error,

> > please immediately notify the sender by reply message and then
delete

> the

> > electronic message and any attachments.

> >

> >
---------------------------------------------------------------------

> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org

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

> >

> >

> 

> **********************************************************************

> This e-mail message and any attachments contain confidential
information

> from Medco. If you are not the intended recipient, you are hereby

> notified that disclosure, printing, copying, distribution, or the
taking

> of any action in reliance on the contents of this electronic
information

> is strictly prohibited. If you have received this e-mail message in

> error, please immediately notify the sender by reply message and then

> delete the electronic message and any attachments.

> 

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org

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

> 

> **********************************************************************

> This e-mail message and any attachments contain confidential
information

> from Medco. If you are not the intended recipient, you are hereby
notified

> that disclosure, printing, copying, distribution, or the taking of any

> action in reliance on the contents of this electronic information is

> strictly prohibited. If you have received this e-mail message in
error,

> please immediately notify the sender by reply message and then delete
the

> electronic message and any attachments.

> 

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org

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

> 

> 

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

Re: log4j----Edit the event received

Posted by Scott Deboy <sc...@gmail.com>.
Here is an example from the tests in log4j:

http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/src/test/resources/org/apache/log4j/rewrite/property.xml?view=markup&pathrev=564831

     <appender name="F1" class="org.apache.log4j.FileAppender">
       <param name="file" value="temp"/>
       <param name="append" value="false"/>
       <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern" value="%p %c - p1:%X{p1} p2:%X{p2}
%m%n"/>
       </layout>
     </appender>


     <appender name="A1" class="org.apache.log4j.rewrite.RewriteAppender">
       <appender-ref ref="F1"/>
       <rewritePolicy
class="org.apache.log4j.rewrite.PropertyRewritePolicy">
         <param name="properties" value="p1=Hello,p2=World,x1=3.1415"/>
       </rewritePolicy>
     </appender>

     <root>
       <level value ="debug" />
       <appender-ref ref="A1" />
     </root>

On Fri, Sep 16, 2011 at 8:49 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Would any one please give an example of xml configuration file with
> Rewrite Appender.
>
> Thank U,
> Vgss
>
> -----Original Message-----
> From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com]
> Sent: Thursday, September 15, 2011 1:57 PM
> To: Log4J Users List
> Subject: RE: log4j----Edit the event received
>
> log4j: Trying to find [server2Rewritelog4j.xml] using context
> classloader sun.misc.Launcher$AppClassLoader@601bb1.
> log4j: Using URL
> [file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml] for
> automatic log4j configuration.
> log4j: Preferred configurator class:
> org.apache.log4j.xml.DOMConfigurator
> log4j: System property is :null
> log4j: Standard DocumentBuilderFactory search succeded.
> log4j: DocumentBuilderFactory is:
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> log4j:WARN Continuable parsing error 19 and column 97
> log4j:WARN Element type "rewritePolicy" must be declared.
> log4j:WARN Continuable parsing error 22 and column 12
> log4j:WARN The content of element type "appender" must match
> "(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
> ?,layout?,filter*,appender-ref*)".
> log4j: debug attribute= "null".
> log4j: Ignoring debug attribute.
> log4j: reset attribute= "false".
> log4j: Threshold ="null".
> log4j: Level value for root is  [debug].
> log4j: root level set to DEBUG
> log4j: Class name: [org.apache.log4j.ConsoleAppender]
> log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
> log4j: Setting property [conversionPattern] to [[%d{ISO8601} %t %c]
> %m%n].
> log4j: Adding appender named [CA] to category [root]
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Thursday, September 15, 2011 1:54 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> There is a DTD for core elements but alternate elements can be added
> (like
> rewritepolicy)...you won't find rewritepolicy in the DTD.
>
> Can you add -Dlog4j.debug=true to your appender-side java command, and
> paste
> the output?
>
> Thanks
>
> Scott
>
> On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > Where can I find XMLschema file for log4j XML configuration file????
> >
> >
> > Thank U,
> > VGSS
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Wednesday, September 14, 2011 4:51 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > Missed the end param on the nested properties param...not sure about
> > case of
> > RewritePolicy node name..may be rewritePolicy.
> >
> > <appender name="rewrite"
> > class="org.apache.log4j.rewrite.RewriteAppender">
> >    <appender name="socket"
> class="org.apache.log4j.net.SocketAppender">
> >      <param name="Port" value="12346"/>
> >      <param name="RemoteHost" value="localhost"/>
> >      <param name="Application" value="app1"/>
> >      <param name="ReconnectionDelay" value="60000"/>
> >      <param name="Threshold" value="ALL"/>
> >    </appender>
> >    <RewritePolicy name="propertyPolicy"
> > class="org.apache.log4j.rewrite.PropertyRewritePolicy">
> >        <param name="properties"
> >
> value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> > tyvalue2"/>
> >    </RewritePolicy>
> > </appender>
> >
> >
> > On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > Thank U...
> > >
> > > -----Original Message-----
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > Sent: Wednesday, September 14, 2011 4:31 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j----Edit the event received
> > >
> > > remoteSourceInfo contains the connected port:
> > >
> > > hostName = socket.getInetAddress().getHostName();
> > > remoteInfo = hostName + ":" + socket.getPort();
> > >
> > > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> > > <Ge...@medco.com>wrote:
> > >
> > > > yes, I got them
> > > >
> > > > how are "hostname" and " log4j.remoteSourceInfo"  different from
> > each
> > > > other....
> > > >
> > > > thank U
> > > > VGSS
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > > Sent: Wednesday, September 14, 2011 4:15 PM
> > > > To: Log4J Users List
> > > > Subject: Re: log4j----Edit the event received
> > > >
> > > > The SocketReceiver adds two properties to each event:
> > > > hostname
> > > > log4j.remoteSourceInfo
> > > >
> > > > With the developer snapshot of Chainsaw you should see those as
> > > > individual
> > > > columns in the table.  If they aren't displayed by default you can
> > > > enable
> > > > them via the tab preferences menu (select Columns).
> > > >
> > > > Scott
> > > >
> > > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > > > <Ge...@medco.com>wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > >
> > > > >
> > > > >  What I am looking for is, every event received by
> SocketAppender,
> > > > even
> > > > > before it send to remote machine, it must append  to the
> event(on
> > > > which
> > > > > log4j is running).
> > > > >
> > > > >
> > > > >
> > > > >  Can any one please tell me a solution for this.
> > > > >
> > > > >
> > > > >
> > > > > Example: if application(running on machine HOSTNAME) logs
> message
> > "I
> > > > am
> > > > > a Logging event", than SOCKET APPENDER must send following to
> > REMOTE
> > > > > machine(or SOCKET RECEIVER on Remote machine should receive
> > > following
> > > > as
> > > > > log message).
> > > > >
> > > > >
> > > > >
> > > > > "HOSTNAME:I am a Logging event"
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Thank U,
> > > > >
> > > > > VGSS
> > > > >
> > > > >
> > >
> **********************************************************************
> > > > > This e-mail message and any attachments contain confidential
> > > > information
> > > > > from Medco. If you are not the intended recipient, you are
> hereby
> > > > notified
> > > > > that disclosure, printing, copying, distribution, or the taking
> of
> > > any
> > > > > action in reliance on the contents of this electronic
> information
> > is
> > > > > strictly prohibited. If you have received this e-mail message in
> > > > error,
> > > > > please immediately notify the sender by reply message and then
> > > delete
> > > > the
> > > > > electronic message and any attachments.
> > > > >
> > > >
> > > >
> > **********************************************************************
> > > > This e-mail message and any attachments contain confidential
> > > information
> > > > from Medco. If you are not the intended recipient, you are hereby
> > > notified
> > > > that disclosure, printing, copying, distribution, or the taking of
> > any
> > > > action in reliance on the contents of this electronic information
> is
> > > > strictly prohibited. If you have received this e-mail message in
> > > error,
> > > > please immediately notify the sender by reply message and then
> > delete
> > > the
> > > > electronic message and any attachments.
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > > For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> > > >
> > > >
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> >
> > **********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then delete
> the
> > electronic message and any attachments.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby
> notified that disclosure, printing, copying, distribution, or the taking
> of any action in reliance on the contents of this electronic information
> is strictly prohibited. If you have received this e-mail message in
> error, please immediately notify the sender by reply message and then
> delete the electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in error,
> please immediately notify the sender by reply message and then delete the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
Would any one please give an example of xml configuration file with
Rewrite Appender.

Thank U,
Vgss

-----Original Message-----
From: Konduru, Geetha [mailto:Geetha_Konduru@medco.com] 
Sent: Thursday, September 15, 2011 1:57 PM
To: Log4J Users List
Subject: RE: log4j----Edit the event received

log4j: Trying to find [server2Rewritelog4j.xml] using context
classloader sun.misc.Launcher$AppClassLoader@601bb1.
log4j: Using URL
[file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml] for
automatic log4j configuration.
log4j: Preferred configurator class:
org.apache.log4j.xml.DOMConfigurator
log4j: System property is :null
log4j: Standard DocumentBuilderFactory search succeded.
log4j: DocumentBuilderFactory is:
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
log4j:WARN Continuable parsing error 19 and column 97
log4j:WARN Element type "rewritePolicy" must be declared.
log4j:WARN Continuable parsing error 22 and column 12
log4j:WARN The content of element type "appender" must match
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
?,layout?,filter*,appender-ref*)".
log4j: debug attribute= "null".
log4j: Ignoring debug attribute.
log4j: reset attribute= "false".
log4j: Threshold ="null".
log4j: Level value for root is  [debug].
log4j: root level set to DEBUG
log4j: Class name: [org.apache.log4j.ConsoleAppender]
log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4j: Setting property [conversionPattern] to [[%d{ISO8601} %t %c]
%m%n].
log4j: Adding appender named [CA] to category [root]

-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Thursday, September 15, 2011 1:54 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

There is a DTD for core elements but alternate elements can be added
(like
rewritepolicy)...you won't find rewritepolicy in the DTD.

Can you add -Dlog4j.debug=true to your appender-side java command, and
paste
the output?

Thanks

Scott

On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Where can I find XMLschema file for log4j XML configuration file????
>
>
> Thank U,
> VGSS
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Wednesday, September 14, 2011 4:51 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> Missed the end param on the nested properties param...not sure about
> case of
> RewritePolicy node name..may be rewritePolicy.
>
> <appender name="rewrite"
> class="org.apache.log4j.rewrite.RewriteAppender">
>    <appender name="socket"
class="org.apache.log4j.net.SocketAppender">
>      <param name="Port" value="12346"/>
>      <param name="RemoteHost" value="localhost"/>
>      <param name="Application" value="app1"/>
>      <param name="ReconnectionDelay" value="60000"/>
>      <param name="Threshold" value="ALL"/>
>    </appender>
>    <RewritePolicy name="propertyPolicy"
> class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>        <param name="properties"
>
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> tyvalue2"/>
>    </RewritePolicy>
> </appender>
>
>
> On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > Thank U...
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Wednesday, September 14, 2011 4:31 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > remoteSourceInfo contains the connected port:
> >
> > hostName = socket.getInetAddress().getHostName();
> > remoteInfo = hostName + ":" + socket.getPort();
> >
> > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > yes, I got them
> > >
> > > how are "hostname" and " log4j.remoteSourceInfo"  different from
> each
> > > other....
> > >
> > > thank U
> > > VGSS
> > >
> > >
> > > -----Original Message-----
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > Sent: Wednesday, September 14, 2011 4:15 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j----Edit the event received
> > >
> > > The SocketReceiver adds two properties to each event:
> > > hostname
> > > log4j.remoteSourceInfo
> > >
> > > With the developer snapshot of Chainsaw you should see those as
> > > individual
> > > columns in the table.  If they aren't displayed by default you can
> > > enable
> > > them via the tab preferences menu (select Columns).
> > >
> > > Scott
> > >
> > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > > <Ge...@medco.com>wrote:
> > >
> > > > Hi,
> > > >
> > > >
> > > >
> > > >  What I am looking for is, every event received by
SocketAppender,
> > > even
> > > > before it send to remote machine, it must append  to the
event(on
> > > which
> > > > log4j is running).
> > > >
> > > >
> > > >
> > > >  Can any one please tell me a solution for this.
> > > >
> > > >
> > > >
> > > > Example: if application(running on machine HOSTNAME) logs
message
> "I
> > > am
> > > > a Logging event", than SOCKET APPENDER must send following to
> REMOTE
> > > > machine(or SOCKET RECEIVER on Remote machine should receive
> > following
> > > as
> > > > log message).
> > > >
> > > >
> > > >
> > > > "HOSTNAME:I am a Logging event"
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Thank U,
> > > >
> > > > VGSS
> > > >
> > > >
> >
**********************************************************************
> > > > This e-mail message and any attachments contain confidential
> > > information
> > > > from Medco. If you are not the intended recipient, you are
hereby
> > > notified
> > > > that disclosure, printing, copying, distribution, or the taking
of
> > any
> > > > action in reliance on the contents of this electronic
information
> is
> > > > strictly prohibited. If you have received this e-mail message in
> > > error,
> > > > please immediately notify the sender by reply message and then
> > delete
> > > the
> > > > electronic message and any attachments.
> > > >
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information
is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail:
log4j-user-help@logging.apache.org
> > >
> > >
> >
> >
**********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of
any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then
delete
> the
> > electronic message and any attachments.
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

**********************************************************************
This e-mail message and any attachments contain confidential information
from Medco. If you are not the intended recipient, you are hereby
notified that disclosure, printing, copying, distribution, or the taking
of any action in reliance on the contents of this electronic information
is strictly prohibited. If you have received this e-mail message in
error, please immediately notify the sender by reply message and then
delete the electronic message and any attachments.

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

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
log4j: Trying to find [server2Rewritelog4j.xml] using context
classloader sun.misc.Launcher$AppClassLoader@601bb1.
log4j: Using URL
[file:/C:/EclipseWorkSpace/GemfireTest/bin/server2Rewritelog4j.xml] for
automatic log4j configuration.
log4j: Preferred configurator class:
org.apache.log4j.xml.DOMConfigurator
log4j: System property is :null
log4j: Standard DocumentBuilderFactory search succeded.
log4j: DocumentBuilderFactory is:
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
log4j:WARN Continuable parsing error 19 and column 97
log4j:WARN Element type "rewritePolicy" must be declared.
log4j:WARN Continuable parsing error 22 and column 12
log4j:WARN The content of element type "appender" must match
"(errorHandler?,param*,rollingPolicy?,triggeringPolicy?,connectionSource
?,layout?,filter*,appender-ref*)".
log4j: debug attribute= "null".
log4j: Ignoring debug attribute.
log4j: reset attribute= "false".
log4j: Threshold ="null".
log4j: Level value for root is  [debug].
log4j: root level set to DEBUG
log4j: Class name: [org.apache.log4j.ConsoleAppender]
log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4j: Setting property [conversionPattern] to [[%d{ISO8601} %t %c]
%m%n].
log4j: Adding appender named [CA] to category [root]

-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Thursday, September 15, 2011 1:54 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

There is a DTD for core elements but alternate elements can be added
(like
rewritepolicy)...you won't find rewritepolicy in the DTD.

Can you add -Dlog4j.debug=true to your appender-side java command, and
paste
the output?

Thanks

Scott

On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Where can I find XMLschema file for log4j XML configuration file????
>
>
> Thank U,
> VGSS
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Wednesday, September 14, 2011 4:51 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> Missed the end param on the nested properties param...not sure about
> case of
> RewritePolicy node name..may be rewritePolicy.
>
> <appender name="rewrite"
> class="org.apache.log4j.rewrite.RewriteAppender">
>    <appender name="socket"
class="org.apache.log4j.net.SocketAppender">
>      <param name="Port" value="12346"/>
>      <param name="RemoteHost" value="localhost"/>
>      <param name="Application" value="app1"/>
>      <param name="ReconnectionDelay" value="60000"/>
>      <param name="Threshold" value="ALL"/>
>    </appender>
>    <RewritePolicy name="propertyPolicy"
> class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>        <param name="properties"
>
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> tyvalue2"/>
>    </RewritePolicy>
> </appender>
>
>
> On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > Thank U...
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Wednesday, September 14, 2011 4:31 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > remoteSourceInfo contains the connected port:
> >
> > hostName = socket.getInetAddress().getHostName();
> > remoteInfo = hostName + ":" + socket.getPort();
> >
> > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > yes, I got them
> > >
> > > how are "hostname" and " log4j.remoteSourceInfo"  different from
> each
> > > other....
> > >
> > > thank U
> > > VGSS
> > >
> > >
> > > -----Original Message-----
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > Sent: Wednesday, September 14, 2011 4:15 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j----Edit the event received
> > >
> > > The SocketReceiver adds two properties to each event:
> > > hostname
> > > log4j.remoteSourceInfo
> > >
> > > With the developer snapshot of Chainsaw you should see those as
> > > individual
> > > columns in the table.  If they aren't displayed by default you can
> > > enable
> > > them via the tab preferences menu (select Columns).
> > >
> > > Scott
> > >
> > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > > <Ge...@medco.com>wrote:
> > >
> > > > Hi,
> > > >
> > > >
> > > >
> > > >  What I am looking for is, every event received by
SocketAppender,
> > > even
> > > > before it send to remote machine, it must append  to the
event(on
> > > which
> > > > log4j is running).
> > > >
> > > >
> > > >
> > > >  Can any one please tell me a solution for this.
> > > >
> > > >
> > > >
> > > > Example: if application(running on machine HOSTNAME) logs
message
> "I
> > > am
> > > > a Logging event", than SOCKET APPENDER must send following to
> REMOTE
> > > > machine(or SOCKET RECEIVER on Remote machine should receive
> > following
> > > as
> > > > log message).
> > > >
> > > >
> > > >
> > > > "HOSTNAME:I am a Logging event"
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Thank U,
> > > >
> > > > VGSS
> > > >
> > > >
> >
**********************************************************************
> > > > This e-mail message and any attachments contain confidential
> > > information
> > > > from Medco. If you are not the intended recipient, you are
hereby
> > > notified
> > > > that disclosure, printing, copying, distribution, or the taking
of
> > any
> > > > action in reliance on the contents of this electronic
information
> is
> > > > strictly prohibited. If you have received this e-mail message in
> > > error,
> > > > please immediately notify the sender by reply message and then
> > delete
> > > the
> > > > electronic message and any attachments.
> > > >
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information
is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail:
log4j-user-help@logging.apache.org
> > >
> > >
> >
> >
**********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of
any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then
delete
> the
> > electronic message and any attachments.
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


Re: log4j----Edit the event received

Posted by Scott Deboy <sc...@gmail.com>.
There is a DTD for core elements but alternate elements can be added (like
rewritepolicy)...you won't find rewritepolicy in the DTD.

Can you add -Dlog4j.debug=true to your appender-side java command, and paste
the output?

Thanks

Scott

On Thu, Sep 15, 2011 at 10:38 AM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Where can I find XMLschema file for log4j XML configuration file????
>
>
> Thank U,
> VGSS
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Wednesday, September 14, 2011 4:51 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> Missed the end param on the nested properties param...not sure about
> case of
> RewritePolicy node name..may be rewritePolicy.
>
> <appender name="rewrite"
> class="org.apache.log4j.rewrite.RewriteAppender">
>    <appender name="socket" class="org.apache.log4j.net.SocketAppender">
>      <param name="Port" value="12346"/>
>      <param name="RemoteHost" value="localhost"/>
>      <param name="Application" value="app1"/>
>      <param name="ReconnectionDelay" value="60000"/>
>      <param name="Threshold" value="ALL"/>
>    </appender>
>    <RewritePolicy name="propertyPolicy"
> class="org.apache.log4j.rewrite.PropertyRewritePolicy">
>        <param name="properties"
> value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
> tyvalue2"/>
>    </RewritePolicy>
> </appender>
>
>
> On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > Thank U...
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Wednesday, September 14, 2011 4:31 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > remoteSourceInfo contains the connected port:
> >
> > hostName = socket.getInetAddress().getHostName();
> > remoteInfo = hostName + ":" + socket.getPort();
> >
> > On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > yes, I got them
> > >
> > > how are "hostname" and " log4j.remoteSourceInfo"  different from
> each
> > > other....
> > >
> > > thank U
> > > VGSS
> > >
> > >
> > > -----Original Message-----
> > > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > > Sent: Wednesday, September 14, 2011 4:15 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j----Edit the event received
> > >
> > > The SocketReceiver adds two properties to each event:
> > > hostname
> > > log4j.remoteSourceInfo
> > >
> > > With the developer snapshot of Chainsaw you should see those as
> > > individual
> > > columns in the table.  If they aren't displayed by default you can
> > > enable
> > > them via the tab preferences menu (select Columns).
> > >
> > > Scott
> > >
> > > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > > <Ge...@medco.com>wrote:
> > >
> > > > Hi,
> > > >
> > > >
> > > >
> > > >  What I am looking for is, every event received by SocketAppender,
> > > even
> > > > before it send to remote machine, it must append  to the event(on
> > > which
> > > > log4j is running).
> > > >
> > > >
> > > >
> > > >  Can any one please tell me a solution for this.
> > > >
> > > >
> > > >
> > > > Example: if application(running on machine HOSTNAME) logs message
> "I
> > > am
> > > > a Logging event", than SOCKET APPENDER must send following to
> REMOTE
> > > > machine(or SOCKET RECEIVER on Remote machine should receive
> > following
> > > as
> > > > log message).
> > > >
> > > >
> > > >
> > > > "HOSTNAME:I am a Logging event"
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Thank U,
> > > >
> > > > VGSS
> > > >
> > > >
> > **********************************************************************
> > > > This e-mail message and any attachments contain confidential
> > > information
> > > > from Medco. If you are not the intended recipient, you are hereby
> > > notified
> > > > that disclosure, printing, copying, distribution, or the taking of
> > any
> > > > action in reliance on the contents of this electronic information
> is
> > > > strictly prohibited. If you have received this e-mail message in
> > > error,
> > > > please immediately notify the sender by reply message and then
> > delete
> > > the
> > > > electronic message and any attachments.
> > > >
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> >
> > **********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then delete
> the
> > electronic message and any attachments.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in error,
> please immediately notify the sender by reply message and then delete the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
Where can I find XMLschema file for log4j XML configuration file????


Thank U,
VGSS

-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Wednesday, September 14, 2011 4:51 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

Missed the end param on the nested properties param...not sure about
case of
RewritePolicy node name..may be rewritePolicy.

<appender name="rewrite"
class="org.apache.log4j.rewrite.RewriteAppender">
    <appender name="socket" class="org.apache.log4j.net.SocketAppender">
      <param name="Port" value="12346"/>
      <param name="RemoteHost" value="localhost"/>
      <param name="Application" value="app1"/>
      <param name="ReconnectionDelay" value="60000"/>
      <param name="Threshold" value="ALL"/>
    </appender>
    <RewritePolicy name="propertyPolicy"
class="org.apache.log4j.rewrite.PropertyRewritePolicy">
        <param name="properties"
value="somepropertyname1=somepropertyvalue1,somepropertyname2=someproper
tyvalue2"/>
    </RewritePolicy>
</appender>


On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Thank U...
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Wednesday, September 14, 2011 4:31 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> remoteSourceInfo contains the connected port:
>
> hostName = socket.getInetAddress().getHostName();
> remoteInfo = hostName + ":" + socket.getPort();
>
> On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > yes, I got them
> >
> > how are "hostname" and " log4j.remoteSourceInfo"  different from
each
> > other....
> >
> > thank U
> > VGSS
> >
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Wednesday, September 14, 2011 4:15 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > The SocketReceiver adds two properties to each event:
> > hostname
> > log4j.remoteSourceInfo
> >
> > With the developer snapshot of Chainsaw you should see those as
> > individual
> > columns in the table.  If they aren't displayed by default you can
> > enable
> > them via the tab preferences menu (select Columns).
> >
> > Scott
> >
> > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > Hi,
> > >
> > >
> > >
> > >  What I am looking for is, every event received by SocketAppender,
> > even
> > > before it send to remote machine, it must append  to the event(on
> > which
> > > log4j is running).
> > >
> > >
> > >
> > >  Can any one please tell me a solution for this.
> > >
> > >
> > >
> > > Example: if application(running on machine HOSTNAME) logs message
"I
> > am
> > > a Logging event", than SOCKET APPENDER must send following to
REMOTE
> > > machine(or SOCKET RECEIVER on Remote machine should receive
> following
> > as
> > > log message).
> > >
> > >
> > >
> > > "HOSTNAME:I am a Logging event"
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Thank U,
> > >
> > > VGSS
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information
is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> >
> >
**********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of
any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then
delete
> the
> > electronic message and any attachments.
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


Re: log4j----Edit the event received

Posted by Scott Deboy <sc...@gmail.com>.
Missed the end param on the nested properties param...not sure about case of
RewritePolicy node name..may be rewritePolicy.

<appender name="rewrite" class="org.apache.log4j.rewrite.RewriteAppender">
    <appender name="socket" class="org.apache.log4j.net.SocketAppender">
      <param name="Port" value="12346"/>
      <param name="RemoteHost" value="localhost"/>
      <param name="Application" value="app1"/>
      <param name="ReconnectionDelay" value="60000"/>
      <param name="Threshold" value="ALL"/>
    </appender>
    <RewritePolicy name="propertyPolicy"
class="org.apache.log4j.rewrite.PropertyRewritePolicy">
        <param name="properties"
value="somepropertyname1=somepropertyvalue1,somepropertyname2=somepropertyvalue2"/>
    </RewritePolicy>
</appender>


On Wed, Sep 14, 2011 at 1:48 PM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Thank U...
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Wednesday, September 14, 2011 4:31 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> remoteSourceInfo contains the connected port:
>
> hostName = socket.getInetAddress().getHostName();
> remoteInfo = hostName + ":" + socket.getPort();
>
> On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > yes, I got them
> >
> > how are "hostname" and " log4j.remoteSourceInfo"  different from each
> > other....
> >
> > thank U
> > VGSS
> >
> >
> > -----Original Message-----
> > From: Scott Deboy [mailto:scott.deboy@gmail.com]
> > Sent: Wednesday, September 14, 2011 4:15 PM
> > To: Log4J Users List
> > Subject: Re: log4j----Edit the event received
> >
> > The SocketReceiver adds two properties to each event:
> > hostname
> > log4j.remoteSourceInfo
> >
> > With the developer snapshot of Chainsaw you should see those as
> > individual
> > columns in the table.  If they aren't displayed by default you can
> > enable
> > them via the tab preferences menu (select Columns).
> >
> > Scott
> >
> > On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> > <Ge...@medco.com>wrote:
> >
> > > Hi,
> > >
> > >
> > >
> > >  What I am looking for is, every event received by SocketAppender,
> > even
> > > before it send to remote machine, it must append  to the event(on
> > which
> > > log4j is running).
> > >
> > >
> > >
> > >  Can any one please tell me a solution for this.
> > >
> > >
> > >
> > > Example: if application(running on machine HOSTNAME) logs message "I
> > am
> > > a Logging event", than SOCKET APPENDER must send following to REMOTE
> > > machine(or SOCKET RECEIVER on Remote machine should receive
> following
> > as
> > > log message).
> > >
> > >
> > >
> > > "HOSTNAME:I am a Logging event"
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Thank U,
> > >
> > > VGSS
> > >
> > >
> **********************************************************************
> > > This e-mail message and any attachments contain confidential
> > information
> > > from Medco. If you are not the intended recipient, you are hereby
> > notified
> > > that disclosure, printing, copying, distribution, or the taking of
> any
> > > action in reliance on the contents of this electronic information is
> > > strictly prohibited. If you have received this e-mail message in
> > error,
> > > please immediately notify the sender by reply message and then
> delete
> > the
> > > electronic message and any attachments.
> > >
> >
> > **********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then delete
> the
> > electronic message and any attachments.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in error,
> please immediately notify the sender by reply message and then delete the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
Thank U...

-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Wednesday, September 14, 2011 4:31 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

remoteSourceInfo contains the connected port:

hostName = socket.getInetAddress().getHostName();
remoteInfo = hostName + ":" + socket.getPort();

On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
<Ge...@medco.com>wrote:

> yes, I got them
>
> how are "hostname" and " log4j.remoteSourceInfo"  different from each
> other....
>
> thank U
> VGSS
>
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Wednesday, September 14, 2011 4:15 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> The SocketReceiver adds two properties to each event:
> hostname
> log4j.remoteSourceInfo
>
> With the developer snapshot of Chainsaw you should see those as
> individual
> columns in the table.  If they aren't displayed by default you can
> enable
> them via the tab preferences menu (select Columns).
>
> Scott
>
> On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > Hi,
> >
> >
> >
> >  What I am looking for is, every event received by SocketAppender,
> even
> > before it send to remote machine, it must append  to the event(on
> which
> > log4j is running).
> >
> >
> >
> >  Can any one please tell me a solution for this.
> >
> >
> >
> > Example: if application(running on machine HOSTNAME) logs message "I
> am
> > a Logging event", than SOCKET APPENDER must send following to REMOTE
> > machine(or SOCKET RECEIVER on Remote machine should receive
following
> as
> > log message).
> >
> >
> >
> > "HOSTNAME:I am a Logging event"
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Thank U,
> >
> > VGSS
> >
> >
**********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of
any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then
delete
> the
> > electronic message and any attachments.
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


Re: log4j----Edit the event received

Posted by Scott Deboy <sc...@gmail.com>.
remoteSourceInfo contains the connected port:

hostName = socket.getInetAddress().getHostName();
remoteInfo = hostName + ":" + socket.getPort();

On Wed, Sep 14, 2011 at 1:23 PM, Konduru, Geetha
<Ge...@medco.com>wrote:

> yes, I got them
>
> how are "hostname" and " log4j.remoteSourceInfo"  different from each
> other....
>
> thank U
> VGSS
>
>
> -----Original Message-----
> From: Scott Deboy [mailto:scott.deboy@gmail.com]
> Sent: Wednesday, September 14, 2011 4:15 PM
> To: Log4J Users List
> Subject: Re: log4j----Edit the event received
>
> The SocketReceiver adds two properties to each event:
> hostname
> log4j.remoteSourceInfo
>
> With the developer snapshot of Chainsaw you should see those as
> individual
> columns in the table.  If they aren't displayed by default you can
> enable
> them via the tab preferences menu (select Columns).
>
> Scott
>
> On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
> <Ge...@medco.com>wrote:
>
> > Hi,
> >
> >
> >
> >  What I am looking for is, every event received by SocketAppender,
> even
> > before it send to remote machine, it must append  to the event(on
> which
> > log4j is running).
> >
> >
> >
> >  Can any one please tell me a solution for this.
> >
> >
> >
> > Example: if application(running on machine HOSTNAME) logs message "I
> am
> > a Logging event", than SOCKET APPENDER must send following to REMOTE
> > machine(or SOCKET RECEIVER on Remote machine should receive following
> as
> > log message).
> >
> >
> >
> > "HOSTNAME:I am a Logging event"
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Thank U,
> >
> > VGSS
> >
> > **********************************************************************
> > This e-mail message and any attachments contain confidential
> information
> > from Medco. If you are not the intended recipient, you are hereby
> notified
> > that disclosure, printing, copying, distribution, or the taking of any
> > action in reliance on the contents of this electronic information is
> > strictly prohibited. If you have received this e-mail message in
> error,
> > please immediately notify the sender by reply message and then delete
> the
> > electronic message and any attachments.
> >
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in error,
> please immediately notify the sender by reply message and then delete the
> electronic message and any attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

RE: log4j----Edit the event received

Posted by "Konduru, Geetha" <Ge...@medco.com>.
yes, I got them

how are "hostname" and " log4j.remoteSourceInfo"  different from each
other....

thank U
VGSS


-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Wednesday, September 14, 2011 4:15 PM
To: Log4J Users List
Subject: Re: log4j----Edit the event received

The SocketReceiver adds two properties to each event:
hostname
log4j.remoteSourceInfo

With the developer snapshot of Chainsaw you should see those as
individual
columns in the table.  If they aren't displayed by default you can
enable
them via the tab preferences menu (select Columns).

Scott

On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Hi,
>
>
>
>  What I am looking for is, every event received by SocketAppender,
even
> before it send to remote machine, it must append  to the event(on
which
> log4j is running).
>
>
>
>  Can any one please tell me a solution for this.
>
>
>
> Example: if application(running on machine HOSTNAME) logs message "I
am
> a Logging event", than SOCKET APPENDER must send following to REMOTE
> machine(or SOCKET RECEIVER on Remote machine should receive following
as
> log message).
>
>
>
> "HOSTNAME:I am a Logging event"
>
>
>
>
>
>
>
>
>
>
>
>
>
> Thank U,
>
> VGSS
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you are not the intended recipient, you are hereby notified that disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronic information is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender by reply message and then delete the electronic message and any attachments.

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


Re: log4j----Edit the event received

Posted by Scott Deboy <sc...@gmail.com>.
The SocketReceiver adds two properties to each event:
hostname
log4j.remoteSourceInfo

With the developer snapshot of Chainsaw you should see those as individual
columns in the table.  If they aren't displayed by default you can enable
them via the tab preferences menu (select Columns).

Scott

On Wed, Sep 14, 2011 at 12:38 PM, Konduru, Geetha
<Ge...@medco.com>wrote:

> Hi,
>
>
>
>  What I am looking for is, every event received by SocketAppender, even
> before it send to remote machine, it must append  to the event(on which
> log4j is running).
>
>
>
>  Can any one please tell me a solution for this.
>
>
>
> Example: if application(running on machine HOSTNAME) logs message "I am
> a Logging event", than SOCKET APPENDER must send following to REMOTE
> machine(or SOCKET RECEIVER on Remote machine should receive following as
> log message).
>
>
>
> "HOSTNAME:I am a Logging event"
>
>
>
>
>
>
>
>
>
>
>
>
>
> Thank U,
>
> VGSS
>
> **********************************************************************
> This e-mail message and any attachments contain confidential information
> from Medco. If you are not the intended recipient, you are hereby notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in error,
> please immediately notify the sender by reply message and then delete the
> electronic message and any attachments.
>