Very timely question & answer.
What if one inherits from XmlSocketAppender class and implement a setLayout() method that frees (deletes)
the XmlLayout that was created and replaces it with the layout in the setLayout() call?
The 'layout' variable defined in AppenderSkeleton (and used by XmlSocketAppender) is protected, so the
derived class has access to it (which is what XmlSocketAppender does).
----- Original Message -----
From: "Curt Arnold"
To: "Log4CXX User"
Subject: Re: Programmatic Configuration of XMLSocketAppender
Date: Thu, 28 May 2009 23:00:08 -0500
Nothing I've seen in the log4cxx codebase suggests that
XMLSocketAppender accepts a layout specification. The log4cxx
0.10.0 code uses an XMLLayout in its implementation, but it is
private. My guess is that your attempt at specifying a layout is
getting ignored. If you want to write your own SocketAppender
that does not output XML, you can base it off of
On May 28, 2009, at 9:21 PM, Henry Chou wrote:
> I currently am sending a log string using the an
> XMLSocketAppender, and am doing so by using the following