Documentation for v0.8.21, an older release. Read v0.9.0, the latest release

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}');
  },
);
  • Local debugging: Dart info, native warn.
  • Performance testing: Dart warn, native error.
  • Production app defaults: both error or none.

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.

Searches the latest release. Esc to close.