logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Chou <narutoreplic...@gmail.com>
Subject Programmatic Configuration of XMLSocketAppender
Date Fri, 29 May 2009 02:21:06 GMT

I currently am sending a log string using the an XMLSocketAppender, and am
doing so by using the following configuration.

     <appender name="MyXmlAppenderFormated"
         <param name="Port" value="2222"/>
         <param name="RemoteHost" value=""/>
         <param name="ReconnectionDelay" value="30000"/>
         <param name="LocationInfo" value="true" />
         <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern" value="%d [%p] - %m%n"/>

I have done this:
pXMLSocketAppender_ = new log4cxx::net::XMLSocketAppender("",

Is there a way to modify the pattern programmatically? I can set most of
these settings by using
XMLSocketAppender->setOption("ReconnectionDelay","30000"), but the
ConversionPattern parameter just isn't done the same way.

Thanks ahead of time,


View raw message