Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3005

cannot override logging.configuration in jboss-cli.sh and jboss-cli.bat

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.1.0.CR1, 8.1.0.Final
    • 8.0.0.Final
    • CLI
    • None

    Description

      when using cli scripts jboss-cli.sh and jboss-cli.bat and you cannot write in $JBOSS_HOME because it is serving many server instances, you can override default jboss-cli.xml setting -Djboss.cli.config in $JAVA_OPTS but you cannot override logging.configuration because in both scripts is set with default after expanding $JAVA_OPTS

      last lines of bat script could be modified as follows:
      echo "%JAVA_OPTS%" | findstr /I "logging.configuration" > nul
      if errorlevel == 1 (
      set "JAVA_OPTS=%JAVA_OPTS% -Dlogging.configuration=file:%JBOSS_HOME%\bin\jboss-cli-logging.properties"
      ) else (
      echo logging.configuration already set in JAVA_OPTS
      )

      "%JAVA%" %JAVA_OPTS% ^
      -jar "%JBOSS_RUNJAR%" ^
      -mp "%JBOSS_MODULEPATH%" ^
      org.jboss.as.cli ^
      %*

      Last lines of sh script could be modified as follows:
      LOG_CONF=`echo $JAVA_OPTS | $GREP "logging.configuration"`
      if [ "x$LOG_CONF" = "x" ]; then
      JAVA_OPTS="$JAVA_OPTS -Dlogging.configuration=file:$JBOSS_HOME/bin/jboss-cli-logging.properties"
      else
      echo "logging.configuration already set in JAVA_OPTS"
      fi

      1. Sample JPDA settings for remote socket debugging
        #JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"

      eval \"$JAVA\" $JAVA_OPTS -jar \"$JBOSS_HOME/jboss-modules.jar\" -mp \"${JBOSS_MODULEPATH}\" org.jboss.as.cli '"$@"'

      Attachments

        Activity

          People

            olubyans@redhat.com Alexey Loubyansky
            garu_jira Gabriele Garuglieri (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: