admin@glassfish.java.net

asadmin CLI logging

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Mon, 13 Sep 2010 12:53:15 -0700

When I removed CLILogger, I had hoped that we could just allow all
classes to use java.util.logging in the normal way. Unfortunately,
that didn't quite work out.

asadmin manipulates the logging level to control the output based
on the value of --terse. If terse=true, the log level is set to INFO.
if terse=false, the log level is set to FINE. asadmin was changing
the log level of the root logger, so that any logger used by any command
would be effected based on the value of --terse. This works fine for
any code that expects to be part of asadmin, but didn't work so well
for other code, as illustrated in this issue:
https://glassfish.dev.java.net/issues/show_bug.cgi?id=13309

JAXB is doing its own logging, unaware of the log level conventions of
asadmin. It didn't seem reasonable to get every possible library used
by asadmin to follow the same conventions as asadmin, so I needed to
change the way asadmin logging works.

asadmin now performs the log level manipulation only for loggers under
com.sun.enterprise.admin.cli, and the "logger" protected field in the
CLICommand class is still associated with that logger. This shouldn't
have any effect on any of the existing asadmin local CLI commands, but
it may change the behavior of any other classes that use a Logger and
are used in asadmin local commands.

If you see any issues that may be related to this, let me know.