Skip to content
ClassDebugger & Diagnostics@public

FlxLog ​

Ring-buffer log that keeps the last MAX_ENTRIES messages. Mirrors AS3 FlxG.log.

ts
export declare class FlxLog

Properties ​

PropertyModifiersTypeDescription
entriesreadonlyreadonly LogEntry[]Live snapshot of stored entries (oldest first).
MAX_ENTRIESstatic readonly``-

Methods ​

add() ​

ts
add(message: string, color?: number): void

Adds a message. Oldest entry is dropped when capacity is exceeded.

Parameters:

ParameterTypeDescription
messagestring-
colornumber-

Returns: void

clear() ​

ts
clear(): void

Removes all stored entries.

Returns: void

error() ​

ts
error(message: string): void

Adds an error-styled (red) message.

Parameters:

ParameterTypeDescription
messagestring-

Returns: void

warn() ​

ts
warn(message: string): void

Adds a warning-styled (yellow) message.

Parameters:

ParameterTypeDescription
messagestring-

Returns: void

Released under the MIT License.