6 Replies Latest reply on Aug 20, 2010 11:22 AM by peterj

    How to stop printing on the console once we run the run.sh/bat

    dokiinfy

      Hi,

       

      I am uning the JBOSS 5.0 EAP in linux and I am trying to stop the message printing on the console when I run the run.sh/bat from $JBOSS_HOME/bin. Although it is writing the message to the "server.log" file. Also I want to generate the PID into a different file.

       

      So some one please guide me what and how to configure to stop printing the message on the console?

        • 1. Re: How to stop printing on the console once we run the run.sh/bat
          ingoschi

          Have a look at the appender "CONSOLE" in your log4j configuration at conf/jboss-log4j.xml

          • 2. Re: How to stop printing on the console once we run the run.sh/bat
            peterj

            The server/xxx/conf/jboss-log4j.xml file governs the logging output for the app server. For the bootstrap code, however, the log4j configuration file is embedded in the bin/run.jar file.

            • 3. Re: How to stop printing on the console once we run the run.sh/bat
              dokiinfy

              Hi,

               

              Thanks for ur nice answer, no doubt it helped me , but after made the changes as suggested, I saw some error messages as attached when I start the server... So Please suggest what else chanegs required for a clean startup?

              • 4. Re: How to stop printing on the console once we run the run.sh/bat
                wolfgangknauf

                Hi,

                 

                you managed to stop log4j output by creating a broken config file - that's a way of stopping logging output I would have never thought about ;-).

                 

                Did you comment/delete the declaration of the "CONSOLE" appender? I think a better way would be to remove the "appender-ref" line at the end of "jboss-log4.xml":

                 

                (let's see how the forum will break this xml snippet :-( )

                <root>
                      <priority value="${jboss.server.log.threshold}"/>
                      <appender-ref ref="CONSOLE"/>
                      <appender-ref ref="FILE"/>
                   </root>

                 

                Hope this helps

                 

                Wolfgang

                • 5. Re: How to stop printing on the console once we run the run.sh/bat
                  dokiinfy

                  Thanks for ur nice reply. I posted this qst, but later I realise the issue and fixed it. Thanks a lot... But related to this I have still one more Question. Some how by making  log4j changes I am successful to stop printing on the console. But while running the run.sh/bat, after the server get started why the execution is not returning to the command promt. Although it is no more printing, but same time it is not  coming out of the execution to prompt.

                  I need, once the server(jvm) started successfully, the execution from run.sh sould automatically come out to nomral prompt and in back ground it should keep running.

                  • 6. Re: How to stop printing on the console once we run the run.sh/bat
                    peterj

                    >>after the server get started why the execution is not returning to  the command promt.

                    Because if you look at the run.bat/sh file you will see that it does not complete until the app server terminates.

                     

                     

                    >>I need, once the server(jvm) started successfully, the execution from run.sh sould automatically come out

                    You can have the command prompt return right away by adding "&" to the end of the run.sh command line on Linux, or "start" in front of the run.bat command line on Windows. There is no way I know of to have the command prompt return only when the app server is started successfully. (Though thinking about this you could probably come up with another script that could do something like this...) Or do you perhaps want to run the app server as a service?