Via API

After you invoke an action, you can stream the invocation’s logs in real time:
import { Kernel } from '@onkernel/sdk';

const kernel = new Kernel();

const logs = await kernel.invocations.follow(invocation_id);

Via CLI

You can also stream the logs to your terminal via the CLI:
kernel logs <app_name> --follow
If you don’t specify --follow, the logs will print to the terminal until 3 seconds of inactivity and then stops.