2 Replies Latest reply on Jun 9, 2006 7:14 PM by bandrewsen

    How do I disable twiddle.log when using twiddle.sh?

      Does anyone know how to turn off twiddle.log when using twiddle.sh?

      Thanks,
      Brent

        • 1. Re: How do I disable twiddle.log when using twiddle.sh?
          peterj

          You are not, by any chance, attempting to run the jboss-nagios plugin? And getting a security error in creating the log file? I wish that the error message would tell me where it was attempting to create the file!

          Anyway, what I did was changed log4j.properties within twiddle.jar to put the twiddle log file at /tmp/twiddle.log. That took care of the problem. You could make a similar change to turn off the log file. Another alternative is to modify twiddle.sh to provide the log4.configuration system property and point to another configuration file that turns logging off.

          • 2. Re: How do I disable twiddle.log when using twiddle.sh?

            Thank you for the response, changing the log4j.properties in twiddle.jar did the trick!

            To follow up on your question:
            I'm not using the jboss-nagios plugin (at least not on purpose!). I'm just using the twiddle utility in a startup script to verify that JBoss is up and running.
            ${JBOSS_HOME}/bin/twiddle.sh -q -s ${BINDADDRESS} get jboss.system:type=Server Started

            There are no security errors, just DEBUG output like this in the log:
            09:32:30,503 DEBUG [Twiddle] args[0]=-s
            09:32:30,504 DEBUG [Twiddle] args[1]={ADDRESS}
            09:32:30,504 DEBUG [Twiddle] args[2]=get
            09:32:30,504 DEBUG [Twiddle] args[3]=jboss.system:type=Server
            09:32:30,504 DEBUG [Twiddle] args[4]=Started
            09:32:30,512 DEBUG [Twiddle] Command name: get
            09:32:30,515 DEBUG [Twiddle] Command arguments: jboss.system:type=Server,Started
            09:32:30,515 DEBUG [Twiddle] command proto type properties: jar:file:/opt/jboss-4.0.3/bin/twiddle.jar!/org/jboss/console/twiddle/commands.properties
            09:32:30,520 DEBUG [Twiddle] Adding command 'xmbean'; proto: org.jboss.console.twiddle.command.XMBeanCommand@16b13c7
            09:32:30,521 DEBUG [Twiddle] Adding command 'info'; proto: org.jboss.console.twiddle.command.InfoCommand@13d93f4
            09:32:30,522 DEBUG [Twiddle] Adding command 'get'; proto: org.jboss.console.twiddle.command.GetCommand@329f3d
            09:32:30,524 DEBUG [Twiddle] Adding command 'invoke'; proto: org.jboss.console.twiddle.command.InvokeCommand@17bd6a1
            09:32:30,525 DEBUG [Twiddle] Adding command 'create'; proto: org.jboss.console.twiddle.command.CreateCommand@15b9e68
            09:32:30,526 DEBUG [Twiddle] Adding command 'setattrs'; proto: org.jboss.console.twiddle.command.SetAttrsCommand@1256ea2
            09:32:30,527 DEBUG [Twiddle] Adding command 'unregister'; proto: org.jboss.console.twiddle.command.UnregisterCommand@18ee9d6
            09:32:30,528 DEBUG [Twiddle] Adding command 'query'; proto: org.jboss.console.twiddle.command.QueryCommand@a9ae05
            09:32:30,530 DEBUG [Twiddle] Adding command 'set'; proto: org.jboss.console.twiddle.command.SetCommand@1f42b49
            09:32:30,531 DEBUG [Twiddle] Adding command 'serverinfo'; proto: org.jboss.console.twiddle.command.ServerInfoCommand@86c347
            09:32:30,532 DEBUG [GetCommand] processing arguments: jboss.system:type=Server,Started
            09:32:30,534 DEBUG [GetCommand] mbean name: jboss.system:type=Server
            09:32:30,534 DEBUG [GetCommand] adding attribute name: Started
            09:32:30,534 DEBUG [GetCommand] attribute names: [Started]
            09:32:30,747 DEBUG [GetCommand] as string[]: Started
            09:32:30,753 DEBUG [SecurityAssociation] Using ThreadLocal: false
            09:32:30,785 DEBUG [GetCommand] attribute list: [javax.management.Attribute@9e5c73]

            Thanks again,
            Brent