Interaction and debugging

This document provides instructions for testing and maintaining your functions post-deployment. It explains how to trigger function logic directly from the CLI with custom payloads and how to stream real-time logs to troubleshoot execution errors or monitor performance.

Once your function is successfully deployed and in a “Running” state, you can interact with it and monitor its execution. This section covers triggering function logic via the CLI and accessing runtime logs.

Invoking Functions

To execute your function and see the result, use the call command group. This allows you to send data to your function and receive the processed output directly in your terminal.

Creating a Call

The call create command triggers the execution of your deployed function.

fathom intelligence function call create <FUNCTION_ID> [OPTIONS]

To read file context stdout can be used:

echo '{}' | fathom intelligence function call create --data - <FUNCTION_ID>

Listing Calls

To see the history of executions, their statuses (e.g., Succeeded, Failed), and execution times:

fathom intelligence function call list <FUNCTION_ID>

Runtime Logs

Debugging a serverless function requires visibility into what happens during execution. The logs command streams the standard output (stdout) and error (stderr) logs from your running instances.

Viewing Function Logs

Unlike build logs, which focus on compilation, these logs show your application’s logic in action (e.g., print statements, caught exceptions, or incoming request traces).

fathom intelligence function logs <FUNCTION_ID>
  • Real-time Debugging: Keep this command running with --watch option in a separate terminal window while you use call create to see immediate feedback.
  • Troubleshooting: If a call fails with a generic error, the logs will typically contain the specific stack trace or error message from your code.