Logger
Defined in: Logger.ts:69
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:80
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:144
Clear the ring buffer.
Returns
Section titled “Returns”void
debug()
Section titled “debug()”debug(
category,message,data?):void
Defined in: Logger.ts:97
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:112
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:132
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:117
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:102
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:92
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:107
Log a warning message.
Parameters
Section titled “Parameters”category
Section titled “category”string
message
Section titled “message”string
unknown
Returns
Section titled “Returns”void