@Description(value = "REST API to set the servicemix log level for an instance (1 for localhost, 0 for global).")
public Response restSetInstanceSMXLogLevel(@PathParam("instanceId") String instanceId, String level)
{
logger.debug("rest-api call to setInstanceSMXLogLevel with instanceId = {}, level = {}",
instanceId != null ? instanceId : "(null)", level != null ? level : "(null)");
LogLevel logLevel = null;
try {
if (LogLevel.isValidLogLevel(level)) {
logLevel = new LogLevel(level);
if (isGlobalInstanceId(instanceId)) {
setGlobalSMXLogLevel(logLevel);
} else {
setLocalSMXLogLevel(logLevel);
}