EnableDebugLogging
Contents
[
Hide
]
EnableDebugLogging toggles verbose diagnostic logs from the native llama.cpp layer. Off by default to minimize production overhead; flip on when investigating a specific problem.
Quick reference
| Type | bool |
| Default | false |
| Category | Engine |
| Field on | EngineParameters.EnableDebugLogging |
What it does
false(default) — the native layer produces no diagnostic output. Inference runs at full throughput.true— the native layer emits tagged lines ([MM],[CTX],[KV], etc.) viaNativeLoggerAdapterinto theILoggeryou pass toAsposeLLMApi.Create. Lines are also written to the file atLogDirectoryPath.
Debug logging adds measurable overhead — typically 5-15 % throughput loss. Not intended for production.
When to change it
| Scenario | Value |
|---|---|
| Default production | false |
| Diagnosing template mismatch, KV eviction, vision alignment | true |
| Benchmarking a specific backend | false (avoid logging overhead) |
| CI / staging runs | Either — depends on debugging requirements |
Example
using Microsoft.Extensions.Logging;
using var loggerFactory = LoggerFactory.Create(b =>
b.AddConsole().SetMinimumLevel(LogLevel.Debug));
var logger = loggerFactory.CreateLogger<Program>();
var preset = new Qwen25Preset();
preset.EngineParameters.EnableDebugLogging = true;
preset.EngineParameters.LogDirectoryPath = "logs/debug-run.log";
using var api = AsposeLLMApi.Create(preset, logger);
// Tagged [MM], [CTX], [KV] lines flow to both the logger and the file.
Interactions
LogDirectoryPath— file destination for debug output.MultimodalContextParameters.Verbosity— mtmd-layer verbosity, independent of this flag.ILoggerpassed toAsposeLLMApi.Create— debug lines route through it.
What’s next
- Logging and diagnostics — tagged log taxonomy.
- Debugging vision — multimodal-specific diagnosis.
- Engine parameters hub — all engine knobs.