3 Replies Latest reply on Jul 20, 2017 12:39 PM by jamezp

    Jboss Server(Node) log to common path

    delhibabu_r

      Hi Everone,

       

      I need to change the every server.log paths to common log path for the centralized log. For example

       

      I have  1 Host Controller and it has 3 servers.     

       

      Path:
      HC1                                                                                                      

      /Test/hc1/domain/servers/server1/log/server.log

      /Test/hc1/domain/servers/server2/log/server.log

      /Test/hc1/domain/servers/server3/log/server.log


      Now I just want to add all these server logging entries in below mentioned path.

       

      /Test/hc1/domain/log/server.log

       

      I have seen the below conversation also, but can't get a clear idea,

      Re: how to configure custom log location in managed domain?

       

      Any help would be appreciated

       

      Thanks in advance

      R.Delhibabu

        • 1. Re: Jboss Server(Node) log to common path
          jamezp

          I wouldn't advise this at all. You don't want 3 separate processes writing to the same file. You could end up with mixed results depending on how the OS decides to handle writes. You'd be best to send messages to some kind of log collector. Some time ago there was a blog post about how to do this with the ELK stack.

           

          If you're already using a log collector and trying to parse logs it would be best to point the log collector to each location.

           

          You could change the directory-grouping to by-type to get a little bit of a different directory structure. The following CLI command will give you the following directory structure.

          /host=master:write-attribute(name=directory-grouping, value=by-type)
          

           

          $JBOSS_HOME/domain/log
          ├── host-controller.log
          ├── process-controller.log
          └── servers
              ├── server-one
              │   └── server.log
              └── server-two
                  └── server.log
          

          --

          James R. Perkins

          • 2. Re: Jboss Server(Node) log to common path
            delhibabu_r

            Thanks James for your valuable comment, I will try to implement ELK for managing the log. However, I just ask it for a test environment, anyway your suggestion helps.

             

             

            -Delhibabu.

            • 3. Re: Jboss Server(Node) log to common path
              jamezp

              Ah okay. If it's for a test environment you could potentially just write you're own that listens for file changes attempts to write to a single file.

               

              --

              James R. Perkins

              1 of 1 people found this helpful