4 Replies Latest reply on Dec 15, 2013 10:00 PM by Sathish Kumar

    Standard logs for CLI Scripts

    Sathish Kumar Newbie

      Hi Guys,

       

      I have a Jboss EAP-6.1 server. I have run the below CLI script to deploy the EAR file. It don't display any standard outputs like, whether the deployment has successful or not?

       

      Is there any way to configure the script to produce the results? Also, Is there any ways to print the standard application logs i.e SystemOut logs?

        • 1. Re: Standard logs for CLI Scripts
          Wolf-Dieter Fink Master

          You did not attach a cli-script!

           

          I don't think you can have a verbose CLI.

          You only get a message if the deployment fails.

           

          The output what failed can be found in the server.log file(s)

           

          What you mean by

          Is there any ways to print the standard application logs i.e SystemOut logs?

          If you have a standalone server you might add the application categories to the logging subsystem and use the CONSOLE appender which print that to STDOUT

          • 2. Re: Standard logs for CLI Scripts
            Sathish Kumar Newbie

            Hi Wolf,

             

            we have a tool to deploy the EAR. So i needs to configure the script that the tool will call the script to deploy. Please find the below CLI Script.

             

            /applic/jboss/current/bin/jboss-cli.sh -c --controller=localhost:9999 --user=jbossadm --password=jboss@dm1n --commands="deploy ../bundles/Sample.ear --force, quit"


            When ever the EAR got deployed, I needs to produce an output like whether the deployment is successful or not.


            Can you please help me to obtain the above scenario ?

            • 3. Re: Standard logs for CLI Scripts
              Wolf-Dieter Fink Master

              You might use the "$?" to get the result from the cli command "--command="deploy ../bundles/Sample.ear --force" it will be <>0 if something is wrong

              • 4. Re: Standard logs for CLI Scripts
                Sathish Kumar Newbie

                Hi Wolf,

                 

                I have deployment-info in the script as below and It's giving the output.

                 

                /applic/jboss/current/bin/jboss-cli.sh -c --controller=localhost:9999 --user=jbossadm --password=jboss@dm1n --commands="deploy ../bundles/Sample.ear --force, deployment-info --name=Sample.ear, quit"

                 

                Which will give the output like :

                 

                NAME           RUNTIME-NAME   PERSISTENT ENABLED STATUS

                Sample.ear    Sample.ear                 true             true           OK