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 Robert Mark Bram <re...@optushome.com.au> on 2002/07/04 06:29:03 UTC

HTML - my own html

Howdy all!

When using the HTML Layout, I would like to insert my own html in the
message body..


      log.debug ("Attempting creation of an expression with parameters: " +
         "<TABLE> yada yada yada </TABLE>");

But I find that when I use this, HTML layout converts my angle brackets to
the html codes &lt; and &gt; so my tags are ignored.

Is there a way to change this?

If this can be done with a property, is there a place can I find a list of
all possible properties?

Thanks for any assistance!

Rob

:)
:-}
;->


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: HTML - my own html

Posted by Thomas Muller <tt...@online.no>.
Robert,

A glimpse at the sourcecode reveals that the HTMLAppender mercilessly
converts the brackets.

	sbuf.append( Transform.escapeTags( event.getRenderedMessage() ) );

Inserting HTML code in the log message strikes me as a bad idea in the first
place, actually, log messages should generally be submittet with no
preference or knowledge of the appender(s) eventually ending up handling it.

Btw, the parameters an appender supports (if poorly documentet) are easy
extractable from the mutators (the set- methods) defined by the appender
class in question.

Hope this helps.

--

Thomas




 | -----Original Message-----
 | From: Robert Mark Bram [mailto:relaxedrob@optushome.com.au]
 | Sent: 04 July 2002 05:29
 | To: Log4j
 | Subject: HTML - my own html
 |
 |
 | Howdy all!
 |
 | When using the HTML Layout, I would like to insert my own html in the
 | message body..
 |
 |
 |       log.debug ("Attempting creation of an expression with
 | parameters: " +
 |          "<TABLE> yada yada yada </TABLE>");
 |
 | But I find that when I use this, HTML layout converts my angle
 | brackets to
 | the html codes &lt; and &gt; so my tags are ignored.
 |
 | Is there a way to change this?
 |
 | If this can be done with a property, is there a place can I find
 | a list of
 | all possible properties?
 |
 | Thanks for any assistance!
 |
 | Rob
 |
 | :)
 | :-}
 | ;->
 |
 |
 | --
 | To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>




*************************************************************************
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. 
The information supplied in this email should be treated in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>