API Reference
Complete reference for Echo’s logging, filtering, history, and tag APIs. For explanations and worked examples, start with the teaching pages; this page is for looking up exact capabilities.
Functions
Logging
Logs a message at the chosen urgency and returns whether the current debug settings allowed it. If you set an allowed tag filter, untagged messages don't pass the filter. This is intentional. The colour is stored as metadata. Echo itself doesn't draw text. Echo Console uses the colour when showing structured history.
eEchoDebugUrgency enum) Logs an INFO message. Info messages are only shown when the debug level is COMPLETE.
Logs a WARNING message. Warning messages pass in COMPREHENSIVE and COMPLETE. In COMPLETE, warning messages include a stack trace.
Logs a SEVERE message and includes a stack trace. Severe messages pass in SEVERE_ONLY, COMPREHENSIVE, and COMPLETE. Severe messages include a stack trace to make the call site easier to identify.
Debug level
Sets which message urgency levels Echo will log. Returns false if the value isn't a valid debug level. This affects future logs only. It doesn't delete old history.
Returns the current eEchoDebugLevel value, or its name when _stringify is true.
History and capture
Writes debug history to a text file. By default this dumps filtered history; pass true to dump raw history instead. The file name starts with echo_debug_dump-. This dumps the formatted text history, not every internal structured field. Returns false if the file can't be created.
Returns the maximum number of entries kept in debug history. 0 means the history is unlimited.
Sets how many entries debug history keeps. Use 0 for no limit. When the history is over the limit, Echo trims the oldest entries first.
Enables or disables raw history capture for the Echo Console. Raw history remembers messages before the current level and tag filters decide whether they belong in the normal log. Echo Console can then search messages that were filtered out when they happened. Raw capture can still retain messages while the debug level is NONE. They don't appear in the normal output or filtered history.
Returns whether raw history capture is enabled for the Echo Console.
Clears all entries from the debug log history This clears the normal and raw histories, including both plain-text and structured entries.
Returns a copy of the current debug history.
Returns the current filtered-history revision number. This revision tracks filtered history only; raw history has its own internal revision.
Returns a new array of structured history entries for UI rendering. A UI can use this to draw the message, urgency, tags, time, stack trace, or colour separately instead of parsing EchoDebugGetHistory() strings.
Tags
Sets which tags are allowed to log. An empty array means "allow all". If the allowed list isn't empty, a log must share at least one tag with that list.
Clears any tag filter so all tags are allowed.
Returns the current allowed tags. An empty array means all tags are allowed. Returns false when Echo is disabled.
Enums
Controls which messages pass into Echo's normal output and filtered history. Raw capture is separate and can remember messages before this filter is applied.
Describes how important one message is.
Macros
Version
Debug setup
Compile-time Echo debug on/off switch. When set to 0, public EchoDebug* calls return false. Use EchoDebugSetLevel() when you need to change logging verbosity at runtime.
1