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
| Name | Type |
|---|---|
logDir | string |
Returns
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
| Name | Type |
|---|---|
sessionId | string |
event | string |
data | TSessionLogData |
Returns
void
Implementation of
Defined in
packages/agent-sessions/dist/node/index.d.ts:87