Logger
Defined in: Logger.ts:47
Structured logger with ring buffer, levels, and category filtering.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Logger(
config?):Logger
Defined in: Logger.ts:57
Parameters
Section titled “Parameters”config?
Section titled “config?”Returns
Section titled “Returns”Logger
Methods
Section titled “Methods”clear()
Section titled “clear()”clear():
void
Defined in: Logger.ts:118
Clear the ring buffer.
Returns
Section titled “Returns”void
debug()
Section titled “debug()”debug(
category,message,data?):void
Defined in: Logger.ts:71
Log a debug message.
Parameters
Section titled “Parameters”category
Section titled “category”string
message
Section titled “message”string
unknown
Returns
Section titled “Returns”void
error()
Section titled “error()”error(
category,message,data?):void
Defined in: Logger.ts:86
Log an error message.
Parameters
Section titled “Parameters”category
Section titled “category”string
message
Section titled “message”string
unknown
Returns
Section titled “Returns”void
formatRecentLogs()
Section titled “formatRecentLogs()”formatRecentLogs(
count?):string
Defined in: Logger.ts:106
Format recent logs as structured text for agent consumption.
Parameters
Section titled “Parameters”count?
Section titled “count?”number
Returns
Section titled “Returns”string
getRecent()
Section titled “getRecent()”getRecent(
count?):LogEntry[]
Defined in: Logger.ts:91
Get recent log entries from the ring buffer.
Parameters
Section titled “Parameters”count?
Section titled “count?”number
Returns
Section titled “Returns”LogEntry[]
info()
Section titled “info()”info(
category,message,data?):void
Defined in: Logger.ts:76
Log an info message.
Parameters
Section titled “Parameters”category
Section titled “category”string
message
Section titled “message”string
unknown
Returns
Section titled “Returns”void
setFrame()
Section titled “setFrame()”setFrame(
frame):void
Defined in: Logger.ts:66
Set the current frame number (incremented externally by the game loop).
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
warn()
Section titled “warn()”warn(
category,message,data?):void
Defined in: Logger.ts:81
Log a warning message.
Parameters
Section titled “Parameters”category
Section titled “category”string
message
Section titled “message”string
unknown
Returns
Section titled “Returns”void