Skip to main contentClass: CommitLog
Defined in: src/lib/logger/components/types.ts:41
Represents a log action within the Maxim system.
CommitLog instances are used to record all changes to components,
they are used by the log writer to persist data to the backend.
CommitLog
Constructors
Constructor
new CommitLog(entity, entityId, action, data): CommitLog
Defined in: src/lib/logger/components/types.ts:55
Creates a new commit log entry.
Parameters
entity
Entity
The type of entity being logged
entityId
string
Unique identifier for the entity instance
action
string
The action being performed (e.g., ‘create’, ‘update’, ‘end’)
data
Record<string, any>
Data associated with the action
Returns
CommitLog
Properties
action
readonly action: string
Defined in: src/lib/logger/components/types.ts:44
data
readonly data: Record<string, any>
Defined in: src/lib/logger/components/types.ts:45
Accessors
Get Signature
get id(): string
Defined in: src/lib/logger/components/types.ts:67
Gets the unique identifier for the entity associated with this log entry.
Returns
string
The entity’s unique ID
type
Get Signature
get type(): Entity
Defined in: src/lib/logger/components/types.ts:76
Gets the entity type for this log entry.
Returns
Entity
The entity type enum value
Methods
serialize()
serialize(): string
Defined in: src/lib/logger/components/types.ts:85
Serializes the commit log to a formatted string representation for logging.
Returns
string
A string representation of the log entry with entity, ID, action, and data