Skip to main content
Glama

livy_get_session_log

Retrieve Spark driver logs to debug session startup issues, troubleshoot failed statements, and investigate Spark driver problems. Supports incremental reads for paging through logs.

Instructions

Fetch incremental Livy driver logs for a session.

Retrieves Spark driver logs for debugging session startup issues or statement problems. Supports incremental reads with start/size parameters for paging through logs.

Use Cases:

  • Debugging session startup issues

  • Troubleshooting failed statements

  • Investigating Spark driver problems

  • Monitoring session health

Note: Returns driver-side logs only, not executor logs.

Parameters: workspace_id: Fabric workspace ID. lakehouse_id: Fabric lakehouse ID. session_id: Livy session ID. start: Starting log line index (default: 0). size: Number of log lines to retrieve (default: 500).

Returns: Dictionary with log content and metadata: {"status": "success", "log_content": "", "log_size_bytes": , "offset": , "size": }.

Example: ```python # Get first 100 log lines result = livy_get_session_log( workspace_id="12345678-1234-1234-1234-123456789abc", lakehouse_id="87654321-4321-4321-4321-210987654321", session_id="0", start=0, size=100 )

for log_line in result.get("log", []): print(log_line) # Get next 100 lines result = livy_get_session_log(..., start=100, size=100) ```

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_idYes
lakehouse_idYes
session_idYes
startNo
sizeNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bablulawrence/ms-fabric-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server