Skip to content

.log ​

Liatir.log provides structured logging for plugins. Every log entry is tagged with the current job ID and streamed in real time to the Liatir Jobs UI, where users can inspect, filter, and export logs.

Logs are also appended to the job's stderr buffer, so they appear in jobs.getOutput() alongside process output.

Methods ​

LevelNodePythonRNative Rust
Informationlog.info(message, meta?)log.info(message, meta=None)log$info(message, meta=NULL)log().info(message, meta)?
Warninglog.warn(message, meta?)log.warn(message, meta=None)log$warn(message, meta=NULL)log().warn(message, meta)?
Errorlog.error(message, meta?)log.error(message, meta=None)log$error(message, meta=NULL)log().error(message, meta)?
Debuglog.debug(message, meta?)log.debug(message, meta=None)log$debug(message, meta=NULL)log().debug(message, meta)?

R uses ctx$liatir$log$info(message, meta = NULL) (and the same signature for warn, error, debug). Native Rust uses ctx.liatir.log().info(message: &str, meta: Value) -> Result<Value>; metadata is mandatory there, so pass json!({}) or json!(null) when unused. Logging an error records a message; propagate an error or stop execution separately when the Plugin must fail.

Parameters ​

ParameterDescription
messageHuman-readable text; a string in every SDK.
metaStructured JSON metadata: a Node object, Python dict, R named list or Native serde_json::Value.

Examples ​

Basic logging ​

Logging inside a long-running job ​

Log levels ​

LevelColor in UIUse case
infoBlueNormal operational messages
warnYellowNon-fatal issues the user should be aware of
errorRedFailures that prevented an operation from completing
debugGrayVerbose diagnostic output for development

Notes ​


IMPORTANT

JSON response fields are always camelCase in Node, Python, R and Native.

  • Log entries are emitted as Tauri events (jobs:log:{jobId}) and displayed in real time in the Jobs UI.
  • Each entry includes a timestamp (Unix epoch milliseconds) added by the backend.
  • The meta field accepts any JSON-serializable object — use it to attach structured context (file paths, counts, error codes) that the UI or downstream tools can parse.
  • Logs are persisted in the job's stderr buffer and can be retrieved via jobs.getOutput().