[jboss-jira] [JBoss JIRA] (WFLY-2899) Help and error messages in Main classes should be printed raw

James Perkins (JIRA) issues at jboss.org
Tue Feb 11 12:31:28 EST 2014


    [ https://issues.jboss.org/browse/WFLY-2899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12943546#comment-12943546 ] 

James Perkins commented on WFLY-2899:
-------------------------------------

Example HC output after patch is applied:
{code}
[jperkins at jperkins-rh build]$ ./target/wildfly-8.0.0.Final-SNAPSHOT/bin/domain.sh --foo
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /home/jperkins/projects/jboss/as/wildfly/build/target/wildfly-8.0.0.Final-SNAPSHOT

  JAVA: /home/jperkins/java/64/default//bin/java

  JAVA_OPTS: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

=========================================================================

09:29:54,685 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.0.Final
09:29:54,804 INFO  [org.jboss.as.process.Host Controller.status] (main) JBAS012017: Starting process 'Host Controller'
[Host Controller] 09:29:55,283 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.0.Final
[Host Controller] JBAS010961: Invalid option '--foo'. Use domain.sh --help for information on valid command line arguments and their syntax.
[Host Controller] 
[Host Controller] Usage: domain.sh [args...]
[Host Controller] where args include:
[Host Controller]     --admin-only                        Set the host controller's running type 
[Host Controller]                                         to ADMIN_ONLY causing it to open 
[Host Controller]                                         administrative interfaces and accept 
[Host Controller]                                         management requests but not start 
[Host Controller]                                         servers or, if this host controller is 
[Host Controller]                                         the master for the domain, accept 
[Host Controller]                                         incoming connections from slave host 
[Host Controller]                                         controllers.
[Host Controller] 
[Host Controller] 
[Host Controller]     -b <value>, -b=<value>              Set system property jboss.bind.address 
[Host Controller]                                         to the given value
[Host Controller] 
[Host Controller] 
[Host Controller]     -b<interface>=<value>               Set system property 
[Host Controller]                                         jboss.bind.address.<interface> to the 
[Host Controller]                                         given value
[Host Controller] 
[Host Controller] 
[Host Controller]     --backup                            Keep a copy of the persistent domain 
[Host Controller]                                         configuration even if this host is not 
[Host Controller]                                         the Domain Controller
[Host Controller] 
[Host Controller] 
[Host Controller]     -c <config>, -c=<config>            Name of the domain configuration file 
[Host Controller]                                         to use (default is "domain.xml") (Same 
[Host Controller]                                         as --domain-config)
[Host Controller] 
[Host Controller] 
[Host Controller]     --cached-dc                         If this host is not the Domain 
[Host Controller]                                         Controller and cannot contact the 
[Host Controller]                                         Domain Controller at boot, boot using a 
[Host Controller]                                         locally cached copy of the domain 
[Host Controller]                                         configuration (see --backup)
[Host Controller] 
[Host Controller] 
[Host Controller]     -D<name>[=<value>]                  Set a system property
[Host Controller] 
[Host Controller] 
[Host Controller]     --domain-config=<config>            Name of the domain configuration file 
[Host Controller]                                         to use (default is "domain.xml") (Same 
[Host Controller]                                         as -c)
[Host Controller] 
[Host Controller] 
[Host Controller]     -h, --help                          Display this message and exit
[Host Controller] 
[Host Controller] 
[Host Controller]     --host-config=<config>              Name of the host configuration file to 
[Host Controller]                                         use (default is "host.xml")
[Host Controller] 
[Host Controller] 
[Host Controller]     --interprocess-hc-address=<address> Address on which the host controller 
[Host Controller]                                         should listen for communication from 
[Host Controller]                                         the process controller
[Host Controller] 
[Host Controller] 
[Host Controller]     --interprocess-hc-port=<port>       Port on which the host controller 
[Host Controller]                                         should listen for communication from 
[Host Controller]                                         the process controller
[Host Controller] 
[Host Controller] 
[Host Controller]     --master-address=<address>          Set system property 
[Host Controller]                                         jboss.domain.master.address to the 
[Host Controller]                                         given value. In a default slave Host 
[Host Controller]                                         Controller config, this is used to 
[Host Controller]                                         configure the address of the master 
[Host Controller]                                         Host Controller.
[Host Controller] 
[Host Controller] 
[Host Controller]     --master-port=<port>                Set system property 
[Host Controller]                                         jboss.domain.master.port to the given 
[Host Controller]                                         value. In a default slave Host 
[Host Controller]                                         Controller config, this is used to 
[Host Controller]                                         configure the port used for native 
[Host Controller]                                         management communication by the master 
[Host Controller]                                         Host Controller.
[Host Controller] 
[Host Controller] 
[Host Controller]     --read-only-domain-config=<config>  Name of the domain configuration file 
[Host Controller]                                         to use. This differs from 
[Host Controller]                                         '--domain-config', '-c' and 
[Host Controller]                                         '-domain-config' in that the initial 
[Host Controller]                                         file is never overwritten.
[Host Controller] 
[Host Controller] 
[Host Controller]     --read-only-host-config=<config>    Name of the host configuration file to 
[Host Controller]                                         use. This differs from '--host-config' 
[Host Controller]                                         in that the initial file is never 
[Host Controller]                                         overwritten.
[Host Controller] 
[Host Controller] 
[Host Controller]     -P <url>, -P=<url>,                 Load system properties from the given 
[Host Controller]          --properties=<url>             url
[Host Controller] 
[Host Controller] 
[Host Controller]     --pc-address=<address>              Address on which the process controller 
[Host Controller]                                         listens for communication from 
[Host Controller]                                         processes it controls
[Host Controller] 
[Host Controller] 
[Host Controller]     --pc-port=<port>                    Port on which the process controller 
[Host Controller]                                         listens for communication from 
[Host Controller]                                         processes it controls
[Host Controller] 
[Host Controller] 
[Host Controller]     -u <value>, -u=<value>              Set system property 
[Host Controller]                                         jboss.default.multicast.address to the 
[Host Controller]                                         given value
[Host Controller] 
[Host Controller] 
[Host Controller]     -V, -v, --version                   Print version and exit
[Host Controller] 
[Host Controller] 
09:29:55,434 INFO  [org.jboss.as.process.Host Controller.status] (reaper for Host Controller) JBAS012010: Process 'Host Controller' finished with an exit status of 99
09:29:55,439 INFO  [org.jboss.as.process] (Thread-6) JBAS012016: Shutting down process controller
09:29:55,440 INFO  [org.jboss.as.process] (Thread-6) JBAS012015: All processes finished; exiting
{code}
                
> Help and error messages in Main classes should be printed raw
> -------------------------------------------------------------
>
>                 Key: WFLY-2899
>                 URL: https://issues.jboss.org/browse/WFLY-2899
>             Project: WildFly
>          Issue Type: Enhancement
>      Security Level: Public(Everyone can see) 
>          Components: Logging
>            Reporter: James Perkins
>            Assignee: James Perkins
>            Priority: Minor
>
> The help in standalone and host-controller main methods gets printed after {{System.out}} and {{System.err}} have been captured by jboss-stdio. This leads the help and errors being printed in a log manager format rather than just the raw text.
> Example output:
> {code}
> [jperkins at jperkins-rh wildfly]$ ./build/target/wildfly-8.0.0.Final-SNAPSHOT/bin/standalone.sh -help
> =========================================================================
>   JBoss Bootstrap Environment
>   JBOSS_HOME: /home/jperkins/projects/jboss/as/wildfly/build/target/wildfly-8.0.0.Final-SNAPSHOT
>   JAVA: java
>   JAVA_OPTS:  -server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
> =========================================================================
> 15:31:43,895 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.0.Final
> 15:31:44,918 INFO  [stdout] (main) 
> 15:31:44,918 INFO  [stdout] (main) Usage: standalone.sh [args...]
> 15:31:44,918 INFO  [stdout] (main) where args include:
> 15:31:44,918 INFO  [stdout] (main)     --admin-only                        Set the server's running type to 
> 15:31:44,919 INFO  [stdout] (main)                                         ADMIN_ONLY causing it to open 
> 15:31:44,919 INFO  [stdout] (main)                                         administrative interfaces and accept 
> 15:31:44,919 INFO  [stdout] (main)                                         management requests but not start other 
> 15:31:44,920 INFO  [stdout] (main)                                         runtime services or accept end user 
> 15:31:44,920 INFO  [stdout] (main)                                         requests.
> 15:31:44,920 INFO  [stdout] (main) 
> 15:31:44,920 INFO  [stdout] (main) 
> 15:31:44,921 INFO  [stdout] (main)     -b <value>, -b=<value>              Set system property jboss.bind.address 
> 15:31:44,921 INFO  [stdout] (main)                                         to the given value
> 15:31:44,921 INFO  [stdout] (main) 
> 15:31:44,921 INFO  [stdout] (main) 
> 15:31:44,922 INFO  [stdout] (main)     -b<interface>=<value>               Set system property 
> 15:31:44,922 INFO  [stdout] (main)                                         jboss.bind.address.<interface> to the 
> 15:31:44,922 INFO  [stdout] (main)                                         given value
> 15:31:44,922 INFO  [stdout] (main) 
> 15:31:44,923 INFO  [stdout] (main) 
> 15:31:44,923 INFO  [stdout] (main)     -c <config>, -c=<config>            Name of the server configuration file 
> 15:31:44,923 INFO  [stdout] (main)                                         to use (default is "standalone.xml") 
> 15:31:44,923 INFO  [stdout] (main)                                         (Same as --server-config)
> 15:31:44,924 INFO  [stdout] (main) 
> 15:31:44,924 INFO  [stdout] (main) 
> 15:31:44,924 INFO  [stdout] (main)     --debug [<port>]                    Activate debug mode with an optional 
> 15:31:44,924 INFO  [stdout] (main)                                         argument to specify the port. Only 
> 15:31:44,925 INFO  [stdout] (main)                                         works if the launch script supports it.
> 15:31:44,925 INFO  [stdout] (main) 
> 15:31:44,925 INFO  [stdout] (main) 
> 15:31:44,925 INFO  [stdout] (main)     -D<name>[=<value>]                  Set a system property
> 15:31:44,926 INFO  [stdout] (main) 
> 15:31:44,926 INFO  [stdout] (main) 
> 15:31:44,926 INFO  [stdout] (main)     -h, --help                          Display this message and exit
> 15:31:44,927 INFO  [stdout] (main) 
> 15:31:44,927 INFO  [stdout] (main) 
> 15:31:44,927 INFO  [stdout] (main)     --read-only-server-config=<config>  Name of the server configuration file 
> 15:31:44,927 INFO  [stdout] (main)                                         to use. This differs from 
> 15:31:44,928 INFO  [stdout] (main)                                         '--server-config' and '-c' in that the 
> 15:31:44,928 INFO  [stdout] (main)                                         original file is never overwritten.
> 15:31:44,928 INFO  [stdout] (main) 
> 15:31:44,928 INFO  [stdout] (main) 
> 15:31:44,929 INFO  [stdout] (main)     -P <url>, -P=<url>,                 Load system properties from the given 
> 15:31:44,929 INFO  [stdout] (main)          --properties=<url>             url
> 15:31:44,929 INFO  [stdout] (main) 
> 15:31:44,929 INFO  [stdout] (main) 
> 15:31:44,930 INFO  [stdout] (main)     -S<name>[=<value>]                  Set a security property
> 15:31:44,930 INFO  [stdout] (main) 
> 15:31:44,930 INFO  [stdout] (main) 
> 15:31:44,930 INFO  [stdout] (main)     --server-config=<config>            Name of the server configuration file 
> 15:31:44,931 INFO  [stdout] (main)                                         to use (default is "standalone.xml") 
> 15:31:44,931 INFO  [stdout] (main)                                         (Same as -c)
> 15:31:44,931 INFO  [stdout] (main) 
> 15:31:44,931 INFO  [stdout] (main) 
> 15:31:44,932 INFO  [stdout] (main)     -u <value>, -u=<value>              Set system property 
> 15:31:44,932 INFO  [stdout] (main)                                         jboss.default.multicast.address to the 
> 15:31:44,932 INFO  [stdout] (main)                                         given value
> 15:31:44,933 INFO  [stdout] (main) 
> 15:31:44,933 INFO  [stdout] (main) 
> 15:31:44,933 INFO  [stdout] (main)     -v, -V, --version                   Print version and exit
> 15:31:44,934 INFO  [stdout] (main) 
> 15:31:44,934 INFO  [stdout] (main)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list