FakeRiak.Debug (fake_riak v0.2.1)

Copy Markdown View Source

Wire-level tracing enabled by --debug (see FakeRiak.CLI).

Prints raw bytes moving in either direction on a connection, plus how the active protocol handler and the TLS layer interpreted them, straight to stderr. This is deliberately far noisier than --verbose request logging and exists for diagnosing failures that happen below the request level — a bad framing assumption, a client speaking a protocol variant fake_riak doesn't expect, or a TLS handshake that fails before there is a request to log at all (e.g. a client reporting nothing more specific than a closed connection).

Summary

Functions

Prints label and a hexdump of data (binary or iodata) to stderr, only when --debug is set.

True when --debug was passed on the command line.

Prints a plain trace line to stderr, only when --debug is set.

Functions

dump(label, data)

Prints label and a hexdump of data (binary or iodata) to stderr, only when --debug is set.

enabled?()

True when --debug was passed on the command line.

trace(message)

Prints a plain trace line to stderr, only when --debug is set.