configured property

DVCapture? get configured

The log a model declared @DVModel(capture: true) writes to.

The one this process configured -- the generated server configures it from dartvel.capture in pubspec.yaml -- or else a log in the database this process has configured, so a captured data model saved from any process that shares the database is still recorded, and the server delivers it. Null only when the process has no database, where the model could not be saved either.

Configured once, the way the database is, because a model that says it is captured should not also have to be handed the machinery.

Implementation

static DVCapture? get configured {
  final DVCapture? log = _configured;
  if (log != null) return log;
  final DVDatabaseAdapter? database = const DVDatabase().configuredAdapter;
  if (database == null) return null;
  return _defaults[database] ??=
      DVCapture(database: database, retention: defaultRetention);
}