Skip to content

Configuration Reference

Lumberjack.init(
# Basic settings
project_name="my-app", # Required: Service identifier
api_key="your-api-key", # For production use
env="production", # Environment tag
# Endpoints
endpoint="https://api.company.com/logs/batch", # Logs endpoint
spans_endpoint="https://api.company.com/spans/batch", # Traces endpoint
metrics_endpoint="https://api.company.com/metrics", # Metrics endpoint
# Local development
local_server_enabled=True, # Enable local server integration
# Performance tuning
batch_size=500, # Logs per batch
batch_age=30.0, # Max seconds before sending
flush_interval=30.0, # Periodic flush interval
# Capture settings
capture_stdout=True, # Capture print() statements
capture_python_logger=True, # Capture logging.* calls
python_logger_level="INFO", # Minimum level to capture
python_logger_name=None, # Specific logger name to capture
# Code snippets
code_snippet_enabled=True, # Include code context in logs
code_snippet_context_lines=5, # Lines of context
code_snippet_max_frames=20, # Max stack frames
# Debugging
debug_mode=False, # Enable debug output
log_to_stdout=True, # Also log to console
stdout_log_level="INFO", # Console log level
# Custom exporters
custom_log_exporter=None, # Custom log exporter
custom_span_exporter=None, # Custom span exporter
custom_metrics_exporter=None, # Custom metrics exporter
)