class

ConnTrace

const class ConnTrace : Actor

ConnTrace provides a debug trace for each connector. Trace messages are stored in RAM using a circular buffer.

methods phase

Trace a phase message

res

Trace a protocol specific response message

dispatch

Trace a dispatch message

read

Get the current trace messages or empty list if not enabled

max

Max number of trace messages to store in RAM

clear

Clear the trace log

poll

Trace a poll message

readSince

Read all trace messages since the given timestamp

disable

Disable tracing for the connector

enable

Enable tracing the connector

isEnabled

Is tracing currently enabled for the connector

event

Trace a protocol specific unsolicited event message

write

Write a trace message

asLog

Expose the trace as a standard system log

req

Trace a protocol specific request message

asLog Log asLog()

Expose the trace as a standard system log. Messages sent to the log instance are traced as follows:

  • if message starts with ">" it is logged as "req" type
  • if message starts with "<" it is logged as "res" type
  • if message starts with "^" it is logged as "event" type
  • otherwise it is logged as "log" type

When logging as a request/response the 2nd line is used as summary with the expectation that log format is patterned as follows:

< message-id
Summary line
... more details ...

clear Void clear()

Clear the trace log

disable Void disable()

Disable tracing for the connector

dispatch Void dispatch(HxMsg msg)

Trace a dispatch message

enable Void enable()

Enable tracing the connector

event Void event(Str msg, Obj arg)

Trace a protocol specific unsolicited event message. The arg must be a Str or Buf. If arg is a Buf then you must call toImmutable on it first to ensure backing array is not cleared.

isEnabled Bool isEnabled()

Is tracing currently enabled for the connector

max Int max()

Max number of trace messages to store in RAM

phase Void phase(Str msg, Obj? arg)

Trace a phase message

poll Void poll(Str msg, Obj? arg)

Trace a poll message

read ConnTraceMsg[] read()

Get the current trace messages or empty list if not enabled. Messages are ordered from oldest to newest.

readSince ConnTraceMsg[] readSince(DateTime? since)

Read all trace messages since the given timestamp. If the timestamp is null, then read all messages in the buffer. Messages are ordered from oldest to newest.

req Void req(Str msg, Obj arg)

Trace a protocol specific request message. The arg must be a Str or Buf. If arg is a Buf then you must call toImmutable on it first to ensure backing array is not cleared.

res Void res(Str msg, Obj arg)

Trace a protocol specific response message. The arg must be a Str or Buf. If arg is a Buf then you must call toImmutable on it first to ensure backing array is not cleared.

write Void write(Str type, Str msg, Obj? arg)

Write a trace message

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST