Default user feedback
John Arbash Meinel
john at arbash-meinel.com
Tue Apr 2 09:15:57 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'd like to open up a discussion about how much user-feedback to give
while running the "juju" client, and how we go about providing that
feedback internally.
Right now, juju commands are generally silent by default (no output
unless --debug or --verbose[1] is supplied, unless there is a one line
error report).
As part of sync-tools, I was making the tool a bit more user-focused,
rather than script focused. So I generally output a message to the
user for any operation that took more than a second or so.
It was noted in review that this was different from all other commands
to date.
I believe Roger feels strongly that juju as a program should be
designed for scripting first and user interaction second. (So the
default should be silent, and the docs can just add "-v" to all the
examples for users.)
At which point, all messages go through the logging infrastructure,
and we just tweak the default log level so that we get an
"appropriate" level of communication at the "-v" level.
I personally would prefer a user-focus first, with a flag to disable
messages for scripting. But I certainly concede that it is best to be
consistent, so that scripting and interactive users can know what to
expect.
I did try to do both:
lp:~jameinel/juju-core/sync-tools
lp:~jameinel/juju-core/sync-tools-logging
You should be able to try them out by configuring an environment, and
sourcing your EC2 credentials (into the bash ENV settings):
$ cd cmd/juju
$ go build
$ ./juju sync-tools -e [target-env] [-v]
I'm trying not to be too biased, so I'd appreciate it if people try it
out. Here is a paste of both running:
http://paste.ubuntu.com/5669878/
Part of the 'noise' is because our standards for logging require us to
put a lot of extra info into the messages (what command is running,
what module is logging, etc.)
I don't know how trivial it would be to configure the 'stderr' logger
to not put as much stuff by default.
I do feel there is a fundamental difference in the messages you should
put to stdout/stderr during a command running, vs what you want to put
into a log file. Though the juju client doesn't write to a log file
without --log-path, so we could bias the client logging to be for
user-visible messages.
Thoughts?
John
=:->
[1] As a side note, --debug and --verbose are IMO undiscoverable. The
only trail I found to them was:
juju help
juju help topics
juju help global-options
There wasn't a breadcrumb from "juju help <command>" that global
options even existed. If we do go with quiet-by-default, we probably
need a better way of discovering '-v'.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlFaoc0ACgkQJdeBCYSNAAMYLwCeJUwiHgEW2EBRcHQIIwCyvKWg
LLIAoL9aluUJavZDn2Pfyw1RbJL26gbU
=IZzD
-----END PGP SIGNATURE-----
More information about the Juju-dev
mailing list