final ModelNode model = context.readModelForUpdate(PathAddress.EMPTY_ADDRESS);
final String level = operation.get(CommonAttributes.LEVEL).asString();
model.get(CommonAttributes.ROOT_LOGGER, CommonAttributes.LEVEL).set(level);
if (context.getType() == OperationContext.Type.SERVER) {
context.addStep(new OperationStepHandler() {
public void execute(OperationContext context, ModelNode operation) {
final ServiceRegistry serviceRegistry = context.getServiceRegistry(false);
final ServiceController<Logger> controller = (ServiceController<Logger>) serviceRegistry.getService(LogServices.ROOT_LOGGER);
if (controller != null) {
controller.getValue().setLevel(Level.parse(level));