Skip to content
Get started

Stream instance logs (SSE)

client.instances.logs(stringid, InstanceLogsParams { follow, source, tail } query?, RequestOptionsoptions?): InstanceLogsResponse | Stream<InstanceLogsResponse>
get/instances/{id}/logs

Streams instance logs as Server-Sent Events. Use the source parameter to select which log to stream:

  • app (default): Guest application logs (serial console)
  • vmm: Cloud Hypervisor VMM logs
  • hypeman: Hypeman operations log

Returns the last N lines (controlled by tail parameter), then optionally continues streaming new lines if follow=true.

ParametersExpand Collapse
id: string
query: InstanceLogsParams { follow, source, tail }
follow?: boolean

Continue streaming new lines after initial output

source?: "app" | "vmm" | "hypeman"

Log source to stream:

  • app: Guest application logs (serial console output)
  • vmm: Cloud Hypervisor VMM logs (hypervisor stdout+stderr)
  • hypeman: Hypeman operations log (actions taken on this instance)
Accepts one of the following:
"app"
"vmm"
"hypeman"
tail?: number

Number of lines to return from end

ReturnsExpand Collapse
InstanceLogsResponse = string
Stream instance logs (SSE)
import Hypeman from '@onkernel/hypeman';

const client = new Hypeman({
  apiKey: 'My API Key',
});

const response = await client.instances.logs('id');

console.log(response);
Returns Examples