change log-level [{--hosts=|-h }host_list] log_level site_name
host_list:
host[,host[,...]]
Set the management agent's cluster logging level. This has
the same effect as using the logger
level
option; however, unlike the
option, this command can be used at run time and does not
require a restart of mcmd. Issuing this
command overrides any value for
level
set in the agent
configuration file.
When used with the log_level
alone
without a host_list
and a
site_name
, this command applies only
to the agent the mcm client is connected to.
In the following example, the logging level is set to
warning
only on the host managed directly by
the agent to which the mcm client is
connected:
mcm> change log-level warning;
+--------------------------------+
| Command result |
+--------------------------------+
| Log-level changed successfully |
+--------------------------------+
1 row in set (0.00 sec)
You can specify the name of a site to be affected by the
command. For example, the following invocation of the command
applies to the site named mysite
:
mcm> change log-level debug mysite;
+--------------------------------+
| Command result |
+--------------------------------+
| Log-level changed successfully |
+--------------------------------+
1 row in set (0.05 sec)
You can also restrict the change to one or more hosts in a given
site using the
--hosts
option
(or its short form
-h
),
with multiple host names separated by commas. The following
command changes the logging level to debug on the hosts named
tonfisk
and haj
, but not
on any other hosts in mysite
:
mcm> change log-level --hosts=tonfisk,haj debug mysite;
+--------------------------------+
| Command result |
+--------------------------------+
| Log-level changed successfully |
+--------------------------------+
1 row in set (0.09 sec)
You must specify a site when using the
--hosts
option;
trying to use
--hosts
alone
results in an error.
Accepted values for log_level
are the
same as for the level
option: one
of debug
, note
,
info
, warning
,
error
, system
, or
fatal
. For more detailed information about
the meanings and effects of these values, see
NDB Cluster Logging Management Commands.