set-log-levels
set-log-levels
Sets the log level for one or more loggers
Synopsis
asadmin [asadmin-options] set-log-levels [--help]
[--target=target]
logger-name=logger-level[:logger-name=logger-level]*
Description
The set-log-levels subcommand sets the log level for one or more
loggers. Changes take effect with some latency for the reconfiguration.
This subcommand is supported in remote mode only.
Options
- asadmin-options
-
Options for the
asadminutility. For information about these options, see theasadmin(1M) help page. --help-?-
Displays the help text for the subcommand.
--target-
The server instance or cluster for which log levels will be set. Valid values are:
-
server- The default server instance. If no target is specified then log levels are set for the default server instance. -
cluster-name - The name of a cluster.
-
instance-name - The name of a standalone server instance.
-
Operands
- logger-name
-
The name of the logger. The
list-log-levelssubcommand can be used to list the names of the current loggers. - logger-level
-
The level to set for the logger. Log level values are
SEVERE,WARNING,INFO,CONFIG,FINE,FINER, andFINEST. The default setting isINFO.
Examples
Example 1 Setting a Log Level for a Logger
This example sets the log level of the web container logger to
WARNING.
asadmin> set-log-levels jakarta.enterprise.system.container.web=WARNING
Command set-log-level executed successfully.
Example 2 Setting the Log Level for Multiple Loggers
This example sets the log level of the web container logger to FINE
and the log level of the EJB container logger to SEVERE:
asadmin set-log-levels jakarta.enterprise.system.container.web=FINE:
jakarta.enterprise.system.container.ejb=SEVERE
Command set-log-level executed successfully.
See Also
collect-log-files(1),
list-log-attributes(1),
list-log-levels(1),
rotate-log(1),
set-log-attributes(1)
"Administering the Logging Service" in Eclipse GlassFish Administration Guide