Extending LogRecord

From: Rakesh Rajan via JavaKB.com (forum_at_JavaKB.com)
Date: 02/28/05


Date: Mon, 28 Feb 2005 06:31:07 GMT

Hi,

   I am writing an application which performs logging too. The problem her
e is that i want to add customized fields in the log too..
 i.e
     right now i get
<log>
<record>
<date>02/28/2005 11:36:31:656 </date>
<sequence>0</sequence>
<logger>mainJava</logger>
<level>SEVERE</level>
<class>com.test.mainJava</class>
<method>main</method>
<message> Xp Log Message </message>
</record>
</log>

i wanted
<log>
<record>
<date>02/28/2005 11:36:31:656 </date>
<sequence>0</sequence>
<logger>mainJava</logger>
<level>SEVERE</level>
<class>com.test.mainJava</class>
<method>main</method>
<parm1>xxxxxxxxxxxxx</parm1> <--------- new fields
<parm2>xxxxxxxxxxxxx</parm2> <--------- new fields
<parm3>xxxxxxxxxxxxx</parm3> <--------- new fields
<message> Xp Log Message </message>
</record>
</log>

could someone guide me for the same ?

-- 
Message posted via http://www.javakb.com


Relevant Pages

  • Determining ram in use CPU utilization
    ... I am looking to do some logging (for historical purposes) in an ... application I am writing. ... built in functions (Visual Studio 2005) does anyone have any leads on ...
    (microsoft.public.vc.language)
  • Re: Smoke and mirrors...
    ... which includes logging of the UNDO ... Only if you think that writing 80 bytes is more overhead than ... However, if you're talking about IOs, a 8-byte IO is still an IO, just as ...
    (comp.databases.informix)
  • Re: Service Crashing
    ... logging in the "catch" (perhaps simply writing the message, ... stacktrace, etc to the event-log). ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Smoke and mirrors...
    ... which includes logging of the UNDO ... Only if you think that writing 80 bytes is more overhead than ... However, if you're talking about IOs, a 8-byte IO is still an IO, just as ...
    (comp.databases.informix)