admin@glassfish.java.net

Re: --echo

From: Lidia Marchioni <lidia_at_sun.com>
Date: Tue, 11 Aug 2009 11:51:29 -0700

I would definitely agree that printing more information, e.g. non user
specified options and environment variables, is a plus. I'm not sure
what was the original intent for the echo command, but we use it for
debugging purposes, when things don't work as expected. We can go back
to the execution logs and often get an idea of what happened without
rerunning of the tests. Thus printing all of the command options, as
Sankar pointed out, is very helpfull. I can't think of a reason to
limit the information printed, other than if it is hard to
read/understand and thus confusing. After all, by default echo is set
to false.

my 2c
Lidia

Jane Young wrote:
> I think it's beneficial to print out the environment variables but
> only for the options that are used in the command.
> Kedar, what is reasoning behind leaving out the environment
> variables? In v2, the environment variables are printed with the
> --echo option.
>
> Instead of adding a new commands, "getoptions" and "setoptions" for
> the default values in multimode, is it possible to use the "export"
> command and make the default values as the environment variables in
> multimode.
> e.g.
>
> $asadmin --host localhost --port 4848 --user admin --echo true multmode
> asadmin>export
> AS_ADMIN_HOST=localhost
> AS_ADMIN_PORT=4848
> AS_ADMIN_USER=admin
> AS_ADMIN_ECHO=true
> asadmin>version --verbose true
> ....
>
> To change the default value, use export command:
> asadmin>export AS_ADMIN_USER=foobar AS_ADMIN_PORT=8484
> asadmin>version --verbose true
>
> To change generic option w/o modifying the environment varialbe:
> asadmin>version --echo false --verbose
>
> Will this work?
>
> Jane
>
>
>
>
> Bill Shannon wrote:
>> Jane Young wrote on 8/11/09 1:54 AM:
>>
>>> cc'ing Sankar and Lidia.
>>> I know Lidia used the --echo option in v2.
>>> Please comment in how you'd like to see the output format of --echo option.
>>>
>>> Bill, more questions. Your proposal of the output format:
>>>
>>> $ asadmin --echo version
>>> asadmin program options: --host localhost --port 4848 --terse false
>>> --interactive true --secure false --echo false
>>> command: version --verbose false
>>>
>>> Does this also include the environment variables?
>>>
>>
>> It was Kedar's proposal, but...
>>
>> Currently --echo doesn't print environment variables, but it does take them
>> into account when printing out the effective options.
>>
>> What would you *want* it to do?
>>
>>
>>> Also, is it possible to not print out "asadmin <generic options>" in
>>> multimode while in singlemode print out "asadmin <generico-option>" if
>>> --echo=true?
>>>
>>
>> Hmmm... Well, it's only software, so it's always possible, but right
>> now there's no globally available notion of "in multimode". It could
>> be added, of course.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>
>>
>