Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 618863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:35:35+00:00 2026-05-13T18:35:35+00:00

I have a Java web application that currently uses Log4J for logging. I’d like

  • 0

I have a Java web application that currently uses Log4J for logging. I’d like to use Apache Chainsaw to view and parse the logs remotely. So far, I’ve had trouble understanding how to setup both the client side (the Chainsaw client) and the server side (the log4j config in my webapp) to successfully enable remote logging.

Here is what I have tried so far.

Server side log4j config

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="true">

   <appender name="myRFA" class="org.apache.log4j.RollingFileAppender">
      <param name="File" value="/logs}/my.log"/>
      <param name="Append" value="false" />
      <param name="MaxFileSize" value="10MB"/>
      <param name="MaxBackupIndex" value="10"/>
      <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern"
            value="%d{ISO8601} %p - [%X{LoggingId}] - %t - %c - %m%n"/>
      </layout>
   </appender>

   <appender name="SOCKET" class="org.apache.log4j.net.SocketAppender">
      <param name="Port" value="4445"/>
      <param name="RemoteHost" value="localhost"/>
      <param name="ReconnectionDelay" value="60000"/>
      <param name="Threshold" value="DEBUG"/>
   </appender>

   <logger name="com" additivity="false">
      <level value="warn"/>
      <appender-ref ref="myRFA"/>
   </logger>

   <logger name="org" additivity="false">
      <level value="warn"/>
      <appender-ref ref="myRFA"/>
   </logger>

</log4j:configuration>

Client side Chainsaw config

I created a new receiver with the following properties

name=SOCKET
port=4445

I will admit that I don’t really understand how it is all supposed to work. Is Chainsaw polling the remote server? Is the remote server connecting to Chainsaw and pushing events to it?

Guidance, links to simple tutorials, or alternate tools would all be welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:35:35+00:00Added an answer on May 13, 2026 at 6:35 pm

    I think you need to add your SOCKET appender to each logger:

       <logger name="com" additivity="false">
          <level value="warn"/>
          <appender-ref ref="myRFA"/>
          <appender-ref ref="SOCKET"/>
       </logger>
    
       <logger name="org" additivity="false">
          <level value="warn"/>
          <appender-ref ref="myRFA"/>
          <appender-ref ref="SOCKET"/>
       </logger>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java web application that uses the SLF4J logging facade. To date,
I have a Flex/Java web application that uses Maven as a build tool. Currently,
We have a desktop application written in Java Swing that currently uses Java Web
I have a web application based on Java/Spring that uses Oracle 11g. Currently, the
We have a web application that uses Spring (3.0.5) and CXF (currently 2.4.2 for
We have a Java web application that uses Spring and Hibernate and has a
We have a Java web service that we call from our application. When we
I have a java enum that is used in my web application. I also
I have built a web application using Java EE platform that sells one of
I have a Java web application at my work and I'd like simplify how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.