Authored by David Tracey
Many software companies are investigating the use of Large Language Models (LLMs) in their products. At Bronto we've announced — an open source tool for running LLMs locally — and show how to pipe its logs into Bronto for search and analysis.
LLMs are complex, non-deterministic systems. Beyond traditional logging use cases (performance monitoring, API usage), their unpredictable nature increases the need for logging — particularly to record and track responses to prompts. Individual log events can be large when they include a full prompt or response. Meta found this problem significant enough at their scale to build a dedicated for your OS, then start the server:
ollama serve
You'll see output including the default port it's listening on (11434).
Download and Run a Model
# Pull a model from the registry
ollama pull gemma:2b
# List downloaded models
ollama list
# Run a model interactively
ollama run gemma:2b
The run command gives you a >>> prompt where you can enter prompts or /help for commands.
Sending Ollama Logs to Bronto
Step 1: Configure Ollama Logging to File
Stop the server and restart it writing logs to a file:
ollama serve > /your_log_path/.ollama/logs/server.log 2>&1
For more detailed debug logs, add to your shell profile (.zprofile etc.):
export OLLAMA_LOG_LEVEL=DEBUG
export OLLAMA_DEBUG=true
To redirect model client logs:
# stderr only (keeps console interactive)
ollama run gemma:2b 2>>/your_log_path/.ollama/logs/gemma.log
# both stdout and stderr (API use only — disables console input)
ollama run gemma:2b > /your_log_path/.ollama/logs/gemma.log 2>&1
Verify logs are flowing:
tail -f /your_log_path/.ollama/logs/server.log
Step 2: Install OpenTelemetry Collector
Download for your platform from to send prompts against a log file and print the response. Example usage:
# Summarize 100 lines of CDN logs
python3 ollama-log-demo.py 100lines-CDN-log.csv \
--model "gemma:2b" \
--prompt "You have been given 100 lines from a CDN log in CSV format. Summarise the logs provided."
# Find errors and suggest fixes
python3 ollama-log-demo.py 100lines-search-log.csv \
--model "gemma:2b" \
--prompt "Find errors in this log and suggest how to fix them"
The final line of each Ollama response includes useful performance metadata:
| Field | Description |
|---|---|
total_duration | Total time spent generating the response |
load_duration | Time spent loading the model (nanoseconds) |
prompt_eval_count | Number of tokens in the prompt |
prompt_eval_duration | Time spent evaluating the prompt (nanoseconds) |
eval_count | Number of tokens in the response |
eval_duration | Time spent generating the response (nanoseconds) |
context | Conversation encoding — pass in next request to maintain memory |
response | Empty if streamed; full response if not streamed |
Model notes from testing: gemma:2b is good for summarizing but tends to give high-level summaries even when asked for specifics. mistral takes longer but produces more detailed, data-specific responses. Defining the right prompt for your use case is key.
Searching Ollama Logs in Bronto
Ollama server logs include a mix of structured and unstructured entries:
Standard log levels:
INFO [main] HTTP server listening | hostname="127.0.0.1" port="11434"
level=INFO source=sched.go:714 msg="new model will fit in available VRAM"
level=DEBUG source=memory.go:103 msg=evaluating library=metal gpu_count=1
Model and resource logs:
llm_load_print_meta: max token length = 93
llama_model_loader: - kv 0: general.architecture str = gemma
level=INFO source=server.go:105 msg="system memory" total="8.0 GiB" free="1.2 GiB"
Even a small test with short prompts generates surprisingly large log volumes — 244 events totaling ~2MB in our test. Bronto handles these unstructured and semi-structured formats natively, and you can add a custom parser to make them more convenient to search and view.
Example searches in Bronto:
Fig.1 — Searching for log events containing "tokens"
Fig.3 — Grouping by prompt evaluation time per task_id
SOCIAL SHARE CARD GENERATOR