Quick Start
Get Lumberjack up and running in your Python project in just a few minutes.
AI-Powered Installation (Recommended)
Section titled “AI-Powered Installation (Recommended)”The fastest way to get started:
uv add 'lumberjack-sdk[local-server]' && uv run lumberjack claude init
This will:
- Install the lumberjack MCP locally with claude
- Optionally kick off a claude session with a pre-filled prompt to instrument the library for you
Manual Installation
Section titled “Manual Installation”If you prefer to set up manually:
Prerequisites
Section titled “Prerequisites”- Python 3.10 or higher
Installation
Section titled “Installation”Using uv (Recommended)
Section titled “Using uv (Recommended)”# Install with local development serveruv add 'lumberjack_sdk[local-server]'
Using pip
Section titled “Using pip”# Install with local development serverpip install 'lumberjack_sdk[local-server]'
Basic Setup
Section titled “Basic Setup”1. Initialize in Your App
Section titled “1. Initialize in Your App”Add Lumberjack to your Python application:
from lumberjack_sdk import Lumberjackimport logging
# Initialize LumberjackLumberjack.init( project_name="my-app", # Local server is auto-discovered!)
# Use standard Python logginglogging.info("Application started")logging.debug("Debug information")logging.warning("Something might be wrong")logging.error("An error occurred")
2. Enable Local Server (Environment Variable)
Section titled “2. Enable Local Server (Environment Variable)”Add this to your .env
file or environment:
LUMBERJACK_LOCAL_SERVER_ENABLED=true
This ensures logs are forwarded to the local development server.
3. Start the Local Server
Section titled “3. Start the Local Server”First, start the Lumberjack local development server:
uv run lumberjack serve# or: lumberjack serve (if installed with pip)
The server will start on http://localhost:8080
and automatically open in your browser.
Tip: You can just leave this server running. The SDK will auto-discover it whenever you start up your dev server.
Framework Examples
Section titled “Framework Examples”from flask import Flaskfrom lumberjack_sdk import Lumberjack, LumberjackFlaskimport logging
app = Flask(__name__)
# Initialize LumberjackLumberjack.init(project_name="my-flask-app")
# Auto-instrument FlaskLumberjackFlask.instrument(app)
@app.route('/')def hello(): logging.info("Hello endpoint called") return "Hello, World!"
FastAPI
Section titled “FastAPI”from fastapi import FastAPIfrom lumberjack_sdk import Lumberjack, LumberjackFastAPIimport logging
app = FastAPI()
# Initialize LumberjackLumberjack.init(project_name="my-fastapi-app")
# Auto-instrument FastAPILumberjackFastAPI.instrument(app)
@app.get("/")async def root(): logging.info("Root endpoint called") return {"message": "Hello World"}
Django
Section titled “Django”In your settings.py
:
from lumberjack_sdk import Lumberjack, LumberjackDjango
# Initialize LumberjackLumberjack.init( project_name="my-django-app")
# Instrument DjangoLumberjackDjango.instrument()
Viewing Your Logs
Section titled “Viewing Your Logs”Once everything is set up:
- Open
http://localhost:8080
in your browser - You’ll see all your logs in real-time
- Use filters to search by level, service, or content
Next Steps
Section titled “Next Steps”- Installation Options - Detailed installation guide
- Claude Integration - Set up AI debugging
- Configuration - Advanced configuration options