4.2.2 The change log-level Command

change log-level log_level [site_name]

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 --log-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 --log-level set on the command line or in the agent configuration file.

When used with the log_level alone, this command applies to the agent as a whole—that is, it applies to all sites on all hosts. In the following example, the logging level is set to warning on all hosts and sites:

mcm> change log-level warning;
+--------------------------------+
| Command result                 |
+--------------------------------+
| Log-level changed successfully |
+--------------------------------+
1 row in set (0.00 sec)

You can restrict the effects of the command by specifying the name of a site, or both. For example, the following invocation of the command applies only 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 additionally restrict the change to one or more hosts in a given site using the --hosts option, with multiple host namesseparated 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=localhost 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 --log-level: one of debug, critical, error, info, message, or warning. For more detailed information about the meanings and effects of these values, see MySQL Cluster Logging Management Commands.

The set log-level command was added in MySQL Cluster Manager 1.2.3.