type
ConnTrace
const class ConnTrace : Actor
ConnTrace provides a debug trace for each connector. Trace messages are stored in RAM using a circular buffer.
methods
asLog |
Expose the trace as a standard system log. |
---|---|
clear |
Clear the trace log |
disable |
Disable tracing for the connector |
dispatch |
Trace a dispatch message |
enable |
Enable tracing the connector |
event |
Trace a protocol specific unsolicited event message. |
isEnabled |
Is tracing currently enabled for the connector |
max |
Max number of trace messages to store in RAM |
phase |
Trace a phase message |
poll |
Trace a poll message |
read |
Get the current trace messages or empty list if not enabled. |
readSince |
Read all trace messages since the given timestamp. |
req |
Trace a protocol specific request message. |
res |
Trace a protocol specific response message. |
write |
Write a trace message |
Slot Details
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
enable
Void enable()
Enable tracing the connector
event
isEnabled
Bool isEnabled()
Is tracing currently enabled for the connector
max
Int max()
Max number of trace messages to store in RAM
phase
poll
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.