log
Module[Log]: one audit entry, as its adapter stored it.
Contents
use utopia_audit::Log;Rust
pub struct LogOne audit log entry: its attributes as the adapter returned them, in their order, with typed getters for the known ones.
The Database adapter returns the whole document ($id, $sequence,
$createdAt, ..., userId, event, ...); the ClickHouse adapter the
selected columns, with id as $id, time in ISO 8601 and the legacy
userId/userType/userInternalId copies of the actor columns.
Rust
use php_std::{Array, ArrayKey, Value};
use utopia_audit::Log;
let mut log = Log::default();
log.set("$id", "a1").set("event", "users.create").set("tenant", "7");
assert_eq!(log.id(), "a1");
assert_eq!(log.event(), "users.create");
assert_eq!(log.tenant(), Some(7));
assert_eq!(log.user_id(), None);Also implements
From.