serialization library

Advanced v2 record serialization utilities.

Import this library when custom transport or storage machinery needs to serialize immutable Record values without using logsmith's built-in loggers. Serializers return complete event frames, including frame terminators and document markers; opening files, routing streams, retrying writes, and delivering bytes intentionally remain the caller's responsibility.

This import is independent of the primary logger API and deliberately does not expose handlers, sinks, stream policies, probes, or delivery machinery.

Classes

IsolateIdentity
Structured identity of the isolate that produced a record.
JsonRecordSerializer
Serializes a v2 Record as a JSON event frame.
Level
A severity level, wrapping an int for ordering.
LogfmtRecordSerializer
Serializes a v2 Record as a logfmt event frame.
MaceRecordSerializer
Serializes a v2 Record as a canonical multiline Mace document frame.
Record
An immutable structured v2 log event.
RecordSerializer
Serializes one v2 Record into a complete event frame.
TextRecordSerializer
Serializes a v2 Record as a plain human-readable text event frame.
TomlRecordSerializer
Serializes a v2 Record as a TOML array-of-tables event frame.
YamlRecordSerializer
Serializes a v2 Record as a YAML document frame.

Enums

FileTextLayout
Physical layout used by file text output.
LogfmtNewlineMode
How logfmt serialization represents embedded newline characters.

Functions

machineRecordToValueTree(Record record) → Map<String, Object?>
Converts a v2 Record to the machine-consumer structured schema.