Skip to main content
Version: LOC v0.6 (legacy)

Logging Agent

Log (debugging) messages to LOC.

The logs can only be read either using Kubernetes tools or in Local Simple Runtime with CLI.

Availability

  • ✓ Generic logic
  • ✓ Aggregator logic

Error Logging

logging.error(value: string | object)
logging.info(value: string | object)

value can be a string or a JSON object. If value is not valid JSON, the agent will throw an error.

Example

// log a JSON object
ctx.agents.logging.error({
error: "error message",
});

// log a string
ctx.agents.logging.info("error message");

Log level

FunctionLevelLog color
errorHighestRed
warnYellow
infoGreen
debug(Does not show in console)
traceLowest(Does not show in console)