From: Mike S. <m...@pe...> - 2005-11-04 03:26:00
|
On Wed, 2 Nov 2005, Antoine Solomon wrote: > what i meant was could i generate a custom tags like > > <tag1 tag_attribute_1= "tag1" tag_attribute_2= "tag2" tag_attribute_2= > "tag3"> > <another_tag> something here </another_tag> > </tag1> > > in your example are the xml all static? I don't see the connection to Log4perl in your XML. Can you elaborate what exactly you want to log? An example of a logging statement like $logger->debug('message'); and the XML output you want it to generate would be helpful. -- Mike Mike Schilli m...@pe... > > On 11/2/05, Mike Schilli <m...@pe...> wrote: > > > > On Wed, 2 Nov 2005, Antoine Solomon wrote: > > > > > Well i am using my own custom layout to create logs for a program i > > have. I > > > would like to instead create a custom XML file so that another > > application > > > can read that file. Similar to the XML::Generator perl module. I am sort > > of > > > a beginner at perl but would gladly like to help if anyone has a need > > for > > > this. > > > > Not sure what your custom format looks like but if you want something like > > > > <message> > > <date>2005/11/02 10:32:11</date> > > <text>A debug message!</text> > > <level>DEBUG</level> > > <category>main</category> > > </message> > > <message> > > <date>2005/11/02 10:32:11</date> > > <text>An info message!</text> > > <level>INFO</level> > > <category>main</category> > > </message> > > > > then it can be accomplished like this: > > > > use Log::Log4perl qw(:easy); > > Log::Log4perl->easy_init({ > > level => $DEBUG, > > layout => <<'XML'}); > > <message> > > <date>%d</date> > > <text>%m</text> > > <level>%p</level> > > <category>%c</category> > > </message> > > XML > > > > DEBUG "A debug message!"; > > INFO "An info message!"; > > > > > > -- Mike > > > > Mike Schilli > > m...@pe... > > > > > > -- > Antoine W. Solomon Jr. > |