I have a large application that's currently using about 40 
RollingFfileAppenders to log the actions occurring in various parts of the app. 
I'd like to transition to using SocketAppender and SocketServer so my app can 
be clustered and each member can delegate to the SocketServer to log events. 
The log4j.xml used in the application looks like:

                <appender name="exceptionLogFile" 
class="org.apache.log4j.RollingFileAppender">
                                <param name="File" value=" 
/logs/exceptions.log"/>
                                <param name="Append" value="true"/>
                                <param name="MaxFileSize" value="1000KB"/>
                                <param name="MaxBackupIndex" value="5"/>
                                <layout class="org.apache.log4j.PatternLayout">
                                                <param name="ConversionPattern" 
value="%x %d %-5p - %m%n"/>
                                </layout>
                </appender>

                Lots more appenders here. They only vary in name.

                <category additivity="false" name="app.exceptions">
                                <priority value="error"/>
                                <appender-ref ref="exceptionLogFile"/>
                </category>

                Lots more categories here. Each one specifies a different 
appender, except a few that share one.

Can I replace each FileAppender with a SocketAppender all pointed to the same 
host/port?
Can the SocketServer maintain the association between each category and the 
FileAppender I want for it?
What would the lcf file look like for this?

I've done plenty of searching on this topic, and most everything I've seen 
deals with very simple cases, but nothing like multiple categories using 
multiple appenders. Any guidance would be most appreciated.

-- bill


________________________________
This e-mail message, including any attachments, is for the sole use of the 
intended recipient(s) and may contain information that is confidential and 
protected by law from unauthorized disclosure. Any unauthorized review, use, 
disclosure or distribution is prohibited. If you are not the intended 
recipient, please contact the sender by reply e-mail and destroy all copies of 
the original message.

Reply via email to