APISonar


org.zstack.core.logging.Log.Log

> org > zstack > core > logging > Log > Log
org APIs zstack APIs core APIs logging APIs Log APIs Log APIs

Example 1
public Flow createKvmHostConnectingFlow(final KVMHostConnectedContext context) {
        return new NoRollbackFlow() {
            String __name__ = "sync-host-capacity";

            @Override
            public void run(FlowTrigger trigger, Map data) {
                new Log(context.getInventory().getUuid()).log(KVMHostLabel.SYNC_HOST_CAPACITY);

                reportCapacity(context.getInventory());
                trigger.next();
            }
        };
    }
Example 2
String log(@PathVariable String uuid, @RequestBody String body) {
        AnsibleLogCmd cmd = JSONObjectUtil.toObject(body, AnsibleLogCmd.class);
        if (cmd.getParameters() != null) {
            new Log(uuid).setLevel(LogLevel.valueOf(cmd.getLevel())).log(cmd.getLabel(), cmd.getParameters());
        } else {
            new Log(uuid).setLevel(LogLevel.valueOf(cmd.getLevel())).log(cmd.getLabel());
        }

        return null;
    }