Logging
On this page
llamadart supports separate log controls for Dart-side and native runtime
layers.
Engine log controls#
await engine.setDartLogLevel(LlamaLogLevel.info);
await engine.setNativeLogLevel(LlamaLogLevel.warn);
// or set both to same value
await engine.setLogLevel(LlamaLogLevel.error);
Global Dart logger configuration#
LlamaEngine.configureLogging(
level: LlamaLogLevel.info,
handler: (record) {
print('[${record.level}] ${record.message}');
},
);
Recommended profiles#
- Local debugging: Dart
info, nativewarn. - Performance testing: Dart
warn, nativeerror. - Production app defaults: both
errorornone.
Troubleshooting noisy logs#
If you still see too much output, verify:
- You are not re-enabling logs in app startup paths.
- Model load/reload paths set levels before first inference.
- Any custom logger handler is filtering correctly.