3 Replies Latest reply on Jun 20, 2012 12:18 PM by James Perkins

    How to do centralized logging in jboss 7.1.1?

    Divya Garg Newbie

      Hello,

       

      I want to do centralized logging in jboss 7.1.1. I am not able to get enough documentation related to this. Can anybody please help me in appending my client logs to server logs?

       

      Thanks

      Divya Garg

        • 1. Re: How to do centralized logging in jboss 7.1.1?
          James Perkins Master

          What kind of information do you need? Are you currently using a log4j configuration?

           

          --

          James R. Perkins

          • 2. Re: How to do centralized logging in jboss 7.1.1?
            Divya Garg Newbie

            Thanks for replying.

             

            I am struggling with jboss logging since days.

            -> I want to use jboss logging & replace SocketAppender that we were using in jboss 4.2.3.

            As far as I understood, I think for that a custom handler needs to be created. I used JUL's SocketHandler class but that needs some SocketServer to connect (initializing SocketHandler was giving ConnectException). So to correct that I created one java.net ServerSocket which helped me finally creating my SocketHandler. But then I didnt understand how to proceed further & append my client logs to server.log (or any other file). Can you please help me out?

             

            -> I also tried with log4j logging.

            But there also I got stuck because I didnt find any way to replace jboss-log4j.xml where I used to create SocketAppender. I was able to use log4j.xml in my application but dont know how to use it for central logging.

             

            Please help me in finding some solution.

             

            Thanks

            Divya Garg

            • 3. Re: How to do centralized logging in jboss 7.1.1?
              James Perkins Master

              Could you post your logging configuration?

               

              From what I'm gathering you want your logger (category) to be processed through both the server.log handler and your SocketHandler. I'm a little confused on the "append my client logs to server.log" part. Generally speaking the files are merged as much as each handler decided whether the log record should be published or not.

               

              --

              James R. Perkins