Skip to content

agent-sdk / Exports / FileSessionLogger

Class: FileSessionLogger

File-based session logger — writes JSONL to {logDir}/{sessionId}.jsonl.

This is the default implementation used by the CLI. Each line is a self-contained JSON object with timestamp, sessionId, event, and data.

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new FileSessionLogger(logDir): FileSessionLogger

Parameters

NameType
logDirstring

Returns

FileSessionLogger

Defined in

packages/agent-sessions/dist/node/index.d.ts:86

Methods

log

log(sessionId, event, data): void

Log a session event with structured data.

Parameters

NameType
sessionIdstring
eventstring
dataTSessionLogData

Returns

void

Implementation of

ISessionLogger.log

Defined in

packages/agent-sessions/dist/node/index.d.ts:87

Released under the MIT License.