• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to pass parameter in log  RSS feed

 
kamesh aru
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fallowing log statement in java programme
logger.info("test");


gives fallowing out put in log
<record>
<date>2005-03-15T14:18:23</date>
<millis>1110917903640</millis>
<sequence>10</sequence>
<logger>parity</logger>
<level>INFO</level>
<class>parity</class>
<method>main</method>
<thread>10</thread>
<message>test</message>
</record>


i would like to pass parameter in the message
i.e <message name="xyz">test</message>


how to do it thanks in advance
 
Joe Ess
Bartender
Posts: 9439
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would probably want to extend java.util.logging.XMLFormatter with support for your message then configure the logging in your application to use that class rather than XMLFormatter.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!